Fix: Correct shipment resolving
This commit is contained in:
@@ -646,6 +646,18 @@ class CheckoutController extends Controller
|
||||
])->render(),
|
||||
// Composer (Providers\CheckoutModuleServiceProvider) fills $cart / $lines.
|
||||
'summaryHtml' => $options === null ? null : view('checkout::partials.cart-body')->render(),
|
||||
// getPaymentMethods() filters by the cart's CURRENT fulfillment
|
||||
// type (Modules\Core\Checkout\Services\CheckoutService's own
|
||||
// docblock) — a shipping-option change can change that filter's
|
||||
// result (e.g. switching to store pickup should drop
|
||||
// cash-on-delivery and offer "pay in store" instead), so this
|
||||
// needs to be re-rendered every time shipping options are,
|
||||
// otherwise the payment section silently goes stale until a
|
||||
// full page reload.
|
||||
'paymentMethodsHtml' => $options === null ? null : view('checkout::partials.payment-methods', [
|
||||
'paymentMethods' => $this->checkout->getPaymentMethods(),
|
||||
'cart' => $cart,
|
||||
])->render(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user