Data zamówienia: = \Shared\Helpers\Helpers::pretty_date( 'j f Y', strtotime( $this -> order['date_order'] ) );?>
Status zamówienia: = $this -> statuses[ $this -> order['status'] ];?>
= ucfirst( \Shared\Helpers\Helpers::lang( 'dane-do-dostawy' ) );?>
= $this -> order['client_surname'];?> = $this -> order['client_name'];?>
= $this -> order['client_street'];?>
= $this -> order['client_postal_code'];?> = $this -> order['client_city'];?>
= $this -> order['client_email'];?>
= $this -> order['client_phone'];?>
if ( $this -> order['inpost_paczkomat'] ):?>
Paczkomat: = $this -> order['inpost_paczkomat'];?>
endif;?>
if ( $this -> order['orlen_point'] ):?>
Punkt Orlen: = $this -> order['orlen_point'];?>
endif;?>
if ( $this -> order['firm_name'] ):?>
= \Shared\Helpers\Helpers::lang( 'dane-do-faktury' );?>:
= $this -> order['firm_name'];?>
= $this -> order['firm_street'];?>
= $this -> order['firm_postal_code'];?> = $this -> order['firm_city'];?>
NIP: = $this -> order['firm_nip'];?>
endif;?>
if ( is_array( $this -> order['products'] ) and count( $this -> order['products'] ) ):?>
foreach ( $this -> order['products'] as $product ):?>
$product_tmp = (new \Domain\Product\ProductRepository($GLOBALS['mdb']))->findCached( $product['product_id'], $lang['id'] );?>
if ( file_exists( substr( $product_tmp['images'][0]['src'], 1 ) ) ):?>

else:?>
endif;?>
= $product['name'];?>
= $product['attributes'];?>
= $product['custom_fields'];?>
= $product['message'] != '' ? 'Wiadomość: ' . $product['message'] : '';?>
$_promo = round( (float)$product['price_brutto_promo'], 2 );
$_base = round( (float)$product['price_brutto'], 2 );
if ( $_promo > 0 and $_promo < $_base ) {
echo \Shared\Helpers\Helpers::decimal( $_promo ) . ' zł';
echo '' . \Shared\Helpers\Helpers::decimal( $_base ) . ' zł';
$discount += \Shared\Helpers\Helpers::normalize_decimal( ( $_base - $_promo ) * $product['quantity'] );
} else {
echo \Shared\Helpers\Helpers::decimal( $_base ) . ' zł';
}
$effective_price = ( $_promo > 0 and $_promo < $_base ) ? $_promo : $_base;
?>
x = $product['quantity'];?>
= \Shared\Helpers\Helpers::decimal( \Shared\Helpers\Helpers::normalize_decimal( $effective_price * $product['quantity'] ) );?> zł
$summary += \Shared\Helpers\Helpers::normalize_decimal( $_base * $product['quantity'] );?>
endforeach;?>
Wartość koszyka = \Shared\Helpers\Helpers::decimal( $summary );?> zł
if ( $discount ):?>
Rabat = \Shared\Helpers\Helpers::decimal( $discount );?> zł
endif;?>
if ( $this -> coupon ):?>
Kod rabatowy: = $this -> coupon['name'];?> - = $this -> coupon['amount'];?> = $this -> coupon['type'] == 1 ? '%' : 'zł';?>
endif;?>
= $this -> order['transport'];?> = \Shared\Helpers\Helpers::decimal( $this -> order['transport_cost'] );?> zł
= ucfirst( \Shared\Helpers\Helpers::lang( 'razem-z-dostawa' ) );?>: = \Shared\Helpers\Helpers::decimal( $summary - $discount + $this -> order['transport_cost'] );?> zł
endif;?>
if ( $this -> order['message'] ):?>
Wiadomość:
endif;?>