fix: display « tarif appliqué » on checkout page
The ``basketTotal`` partial expects ``$sale_channel`` as a top-level view variable. The cart page passed it correctly, but the checkout page and the AJAX basket refresh only passed it nested inside ``$basket``.
This commit is contained in:
@@ -68,8 +68,10 @@ class BasketController extends Controller
|
|||||||
|
|
||||||
public function getBasketTotal($deliveryId = false, $deliveryTypeId = false)
|
public function getBasketTotal($deliveryId = false, $deliveryTypeId = false)
|
||||||
{
|
{
|
||||||
|
$basket = Baskets::getBasketTotal($deliveryId, $deliveryTypeId);
|
||||||
$data = [
|
$data = [
|
||||||
'basket' => Baskets::getBasketTotal($deliveryId, $deliveryTypeId),
|
'basket' => $basket,
|
||||||
|
'sale_channel' => $basket['sale_channel'] ?? null,
|
||||||
];
|
];
|
||||||
|
|
||||||
return view('Shop.Baskets.partials.basketTotal', $data);
|
return view('Shop.Baskets.partials.basketTotal', $data);
|
||||||
|
|||||||
@@ -40,7 +40,10 @@
|
|||||||
<div class="col-sm-12 col-lg-4">
|
<div class="col-sm-12 col-lg-4">
|
||||||
<x-card class='shadow'>
|
<x-card class='shadow'>
|
||||||
<div id="basketTotal">
|
<div id="basketTotal">
|
||||||
@include('Shop.Baskets.partials.basketTotal', ['basket' => $basket])
|
@include('Shop.Baskets.partials.basketTotal', [
|
||||||
|
'basket' => $basket,
|
||||||
|
'sale_channel' => $basket['sale_channel'] ?? null,
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</x-card>
|
</x-card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user