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:
Valentin Lab
2026-02-09 10:00:39 +01:00
parent 2771a09a90
commit f6eb686fcd
2 changed files with 7 additions and 2 deletions

View File

@@ -68,8 +68,10 @@ class BasketController extends Controller
public function getBasketTotal($deliveryId = false, $deliveryTypeId = false)
{
$basket = Baskets::getBasketTotal($deliveryId, $deliveryTypeId);
$data = [
'basket' => Baskets::getBasketTotal($deliveryId, $deliveryTypeId),
'basket' => $basket,
'sale_channel' => $basket['sale_channel'] ?? null,
];
return view('Shop.Baskets.partials.basketTotal', $data);