@foreach ($products as $product)
@if ($product['product_id'] == 616)
{{ $Currency::convert($product['price'], false, true) }}
{{ $Currency::convert($product['price']) }}
@else
{{ $product['name'] }}
@if (!in_array($product['product_id'], [616, 619, 620, 483, 484, 501, 615]))
{{$product['dosage_name']}}
@endif
@if (ceil(100 - ($product['price'] / ($product['max_pill_price'] * $product['num'])) * 100) == 0)
{{ $Currency::convert($product['price'], true) }}
@else
{{ $Currency::convert($product['max_pill_price'] * $product['num'], true) }} -{{ ceil(100 - ($product['price'] / ($product['max_pill_price'] * $product['num'])) * 100) }}%
{{__('text.cart_only')}} {{ $Currency::convert($product['price'], true) }}
@endif
@if (ceil(100 - ($product['price'] / ($product['max_pill_price'] * $product['num'])) * 100) == 0)
{{__('text.cart_only')}} {{ $Currency::convert($product['price'] * $product['q'], true) }}
@else
{{ $Currency::convert($product['max_pill_price'] * $product['num'] * $product['q'], true) }} -{{ ceil(100 - ($product['price'] / ($product['max_pill_price'] * $product['num'])) * 100) }}%
{{__('text.cart_only')}} {{ $Currency::convert($product['price'] * $product['q'], true) }}
@endif
@if (!empty($product['upgrade_pack']))
{{__('text.cart_upgrade')}}{{ $product['upgrade_pack']['num'] }} {{ $product['type_name'] }} {{__('text.cart_for_only')}} {{ $Currency::convert($product['upgrade_pack']['price'] - $product['price']) }}
{{__('text.cart_savei')}} {{ $Currency::convert($product['max_pill_price'] * $product['upgrade_pack']['num'] - $product['upgrade_pack']['price']) }}.
@if ($product_total + ($product['upgrade_pack']['price'] - $product['price']) >= 200 && $product_total + ($product['upgrade_pack']['price'] - $product['price']) < 300)
{{__('text.cart_get_regular')}}
@elseif ($product_total + ($product['upgrade_pack']['price'] - $product['price']) >= 300)
{{__('text.cart_get_ems')}}
@endif
@endif
@endif
@endforeach
@if (!$is_only_card)
@endif
@if (env('APP_GIFT_CARD') == 1)
@if (!$has_card)
@endif
@endif
@php
$total_discount = 0;
foreach ($products as $product) {
if($product['dosage'] != '1card')
{
$total_discount += $product['max_pill_price'] * $product['num'] * $product['q'];
}
else {
$total_discount += $product['price'] * $product['q'];
}
}
$total_discount_product = ceil($total_discount);
$total_discount += session('cart_option')['bonus_price'];
if (!$is_only_card) {
$total_discount += $shipping[session('cart_option')['shipping']];
}
$discount = ceil(100 - (session('total')['all'] / $total_discount) * 100);
if ($is_only_card_with_bonus) {
$saving = 0;
$discount = 0;
} else {
$saving = $total_discount - session('total')['all'];
}
@endphp
{{__('text.cart_total_price_text')}}
@if (!$is_only_card && $total_discount_product != (session('total.product_total') - session('total.bonus_total')))
{{ $Currency::convert($total_discount) }} -{{ $discount }}%
{{__('text.cart_saving')}} {{ $Currency::convert($saving) }}
{{__('text.cart_only')}} {{ session('total')['all_in_currency'] }}
@endif
@if ($total_discount_product == (session('total.product_total') - session('total.bonus_total')) || $is_only_card)
{{ session('total')['all_in_currency'] }}
@endif