@php /** * @name Pagina carrello\Riepilogo\Totali * @version 1.0.0 */ @endphp @php $exchange_status = false; $exchange_mode = false; $info = false; $exchange_class = ''; if($exchange !== false){ if($exchange->is_active()){ $exchange_mode = $exchange->get_current(); $exchange_class = ' cart-header-info-mode-' . $exchange_mode; } if($exchange_mode == 'change' || $exchange_mode == 'return'){ $exchange_status = true; $info = $exchange->get_info(); $exchange_total = (!empty($info->get_exchange_total())) ? $info->get_exchange_total()->get_amount_format(true) : 0; $cart_status = (!empty($info->get_cart_status())) ? $info->get_cart_status() : false; $cart_progress = (!empty($info->get_cart_progress())) ? $info->get_cart_progress() : 0; $cart_preogress_status = (!empty($info->get_cart_progress_status())) ? $info->get_cart_progress_status() : 'success'; if($exchange_mode == 'change'){ $exchange_restock_total = (!empty($info->get_exchange_restock_total())) ? $info->get_exchange_restock_total()->get_amount_format(true) : 0; $cart_restock_status = (!empty($info->get_cart_restock_status())) ? $info->get_cart_restock_status() : false; $cart_restock_progress = (!empty($info->get_cart_restock_progress())) ? $info->get_cart_restock_progress() : 0; $cart_restock_preogress_status = (!empty($info->get_cart_restock_progress_status())) ? $info->get_cart_restock_progress_status() : 'alert'; } } } $rules_limit_status = false; if($rules_limit !== false){ $rules_limit_status = true; $rules_limit_type = $rules_limit->get_type(); if($rules_limit_type == 'amount'){ $rules_limit_total = (!empty($rules_limit->get_limit())) ? $rules_limit->get_limit()->get_amount_format(true) : 0; } if($rules_limit_type == 'quantity'){ $rules_limit_total = (!empty($rules_limit->get_limit_quantity())) ? $rules_limit->get_limit_quantity() : 0; } $rules_limit_progress = (!empty($rules_limit->get_limit_progress())) ? $rules_limit->get_limit_progress() : 0; $rules_limit_preogress_status = (!empty($rules_limit->get_limit_progress_status())) ? $rules_limit->get_limit_progress_status() : 'alert'; } @endphp
@if ($exchange_status) @endif {!! $cart->get_quantity() !!} {!! get_default_um_description() !!}
{!! $cart->get_amount_html() !!}
@if ($exchange_mode == 'change')
{!! $cart_restock->get_quantity() !!} {!! get_default_um_description() !!}
{!! $cart_restock->get_amount_html() !!}
@php $total_quantity = $cart_restock->get_quantity() - $cart->get_quantity(); $total_amount_cart = $cart->get_amount_number(); $total_amount_restock = $cart_restock->get_amount_number(); $total_amount = $total_amount_restock - $total_amount_cart; $total_amount = $cart->get_amount_format($total_amount, true); @endphp
{!! $total_quantity !!} {!! get_default_um_description() !!}
{!! $total_amount !!}
@endif @if($exchange_status)
{{ __t('Imponibile massimo') }}
{!! $exchange_total !!}
@if($exchange_mode == 'change')
{{ __t('Imponibile minimo') }}
{!! $exchange_restock_total !!}
@endif
@endif @if($rules_limit_status)
@if ($rules_limit_type == 'amount') {{ __t('Imponibile minimo') }} @endif @if ($rules_limit_type == 'quantity') {{ __t('Quantità minima') }} @endif
{!! $rules_limit_total !!}
@endif