@extends('frontend.layouts.app')
@section('content')
{{ translate('1. My Cart') }}
{{ translate('2. Shipping info') }}
{{ translate('3. Delivery info') }}
{{ translate('4. Payment') }}
{{ translate('5. Confirmation') }}
@php
$total = 0;
@endphp
@foreach ($carts as $key => $cartItem)
@php
$product = \App\Models\Product::find($cartItem['product_id']);
$product_stock = $product->stocks->where('variant', $cartItem['variation'])->first();
// $total = $total + ($cartItem['price'] + $cartItem['tax']) * $cartItem['quantity'];
$total = $total + cart_product_price($cartItem, $product, false) * $cartItem['quantity'];
$product_name_with_choice = $product->getTranslation('name');
if ($cartItem['variation'] != null) {
$product_name_with_choice = $product->getTranslation('name') . ' - ' . $cartItem['variation'];
}
@endphp
{{ translate('Your Cart is empty') }}