@extends('vendor.site-bases.website.layouts.master') @section('title', trans('title.cart')) @section('page_title', trans('title.cart')) @section('breadcrumbs') {!! Breadcrumbs::render('cart') !!} @endsection @section('content') @if (session('error'))
{{ session('error') }}
@endif
@foreach ($carts as $item) @php $itemPrice = ($item->product->onl_price ?: $item->product->discount_price ?: $item->product->item_price) * $item->quantity; $itemNotDiscountedPrice = $item->product->item_price * $item->quantity; $price += $itemPrice; $notDiscountedPrice += $itemNotDiscountedPrice; @endphp @endforeach
@lang('site.product') @lang('site.quantity') @lang('site.unit_price') @lang('site.price')
@if ($item->product->parent) {{ $item->product->parent->title }} @else {{ $item->product->title }} @endif
@if ($item->product->parent) {{ $item->product->parent->title }} @else {{ $item->product->title }} @endif
@if ($item->product->onl_price) {{ $item->product->onl_price }}o {{ $item->product->item_price }}o @elseif ($item->product->discount_price) {{ $item->product->item_price }}o {{ $item->product->discount_price }}o @else {{ $item->product->item_price }}o @endif
{{ number_format($itemPrice, 2) }}o
@lang('site.delete_all')
@lang('site.cart')
{{ round($carts->sum('quantity')) }} @lang('site.product')
@lang('site.before_discount')
{{ number_format($notDiscountedPrice, 2) }}o
@lang('site.discount')
-{{ number_format($notDiscountedPrice - $price, 2) }}o
@lang('site.sum_price')
{{ number_format($price, 2) }}o
@if ($mainOnlineSaleProductsCount > 0)

@lang('site.products')

@lang('site.all_products') ({{ $mainOnlineSaleProductsCount }})
@endif @endsection @section('scripts') @endsection