fix on weight

This commit is contained in:
ludo
2023-11-13 00:40:41 +01:00
parent 741f389620
commit 7ec1d3e89b
7 changed files with 74 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Shop;
use App\Http\Controllers\Controller;
use App\Repositories\Core\User\ShopCart;
use App\Repositories\Shop\Baskets;
use App\Repositories\Shop\DeliveryTypes;
use App\Repositories\Shop\Offers;
use App\Repositories\Shop\Orders;
use App\Repositories\Users;
@@ -62,6 +63,19 @@ class BasketController extends Controller
return ShopCart::count();
}
public function getBasketTotal($deliveryTypeId = false)
{
$data = [
'basket' => ShopCart::getSummary(),
];
$weight = Baskets::getWeight();
$data['basket']['shipping'] = DeliveryTypes::getPrice($deliveryTypeId, $weight);
return view('Shop.Baskets.partials.basketTotal', $data);
}
public function getSummary()
{
$data = ShopCart::getSummary();