110 lines
4.8 KiB
PHP
110 lines
4.8 KiB
PHP
<div class="order-summary-content">
|
|
<div class="top">
|
|
<div class="basket-summary left">
|
|
Data zamówienia: <span><?= \S::pretty_date( 'j f Y', strtotime( $this -> order['date_order'] ) );?></span>
|
|
</div>
|
|
<div class="basket-summary left">
|
|
Status zamówienia: <span><?= $this -> statuses[ $this -> order['status'] ];?></span>
|
|
</div>
|
|
</div>
|
|
<div class="top-second">
|
|
<div class="column">
|
|
<h5><?= ucfirst( \S::lang( 'dane-do-dostawy' ) );?></h5>
|
|
<p>
|
|
<?= $this -> order['client_surname'];?> <?= $this -> order['client_name'];?><br />
|
|
<?= $this -> order['client_street'];?><br />
|
|
<?= $this -> order['client_postal_code'];?> <?= $this -> order['client_city'];?><br />
|
|
<?= $this -> order['client_email'];?><br />
|
|
<?= $this -> order['client_phone'];?>
|
|
<? if ( $this -> order['inpost_paczkomat'] ):?>
|
|
<br /><br />Paczkomat: <b><?= $this -> order['inpost_paczkomat'];?>
|
|
<? endif;?>
|
|
<? if ( $this -> order['orlen_point'] ):?>
|
|
<br /><br />Punkt Orlen: <b><?= $this -> order['orlen_point'];?>
|
|
<? endif;?>
|
|
</p>
|
|
</div>
|
|
<div class="column">
|
|
<? if ( $this -> order['firm_name'] ):?>
|
|
<h5><?= \S::lang( 'dane-do-faktury' );?>:</h5>
|
|
<p>
|
|
<?= $this -> order['firm_name'];?><br />
|
|
<?= $this -> order['firm_street'];?><br />
|
|
<?= $this -> order['firm_postal_code'];?> <?= $this -> order['firm_city'];?><br />
|
|
NIP: <?= $this -> order['firm_nip'];?>
|
|
</p>
|
|
<? endif;?>
|
|
</div>
|
|
</div>
|
|
<div class="products">
|
|
<? if ( is_array( $this -> order['products'] ) and count( $this -> order['products'] ) ):?>
|
|
<? foreach ( $this -> order['products'] as $product ):?>
|
|
<? $product_tmp = \shop\Product::getFromCache( $product['product_id'], $lang['id'] );?>
|
|
<div class="basket-product">
|
|
<div class="image">
|
|
<? if ( file_exists( substr( $product_tmp['images'][0]['src'], 1 ) ) ):?>
|
|
<img class="main-img" src="<?= $product_tmp['images'][0]['src'];?>" alt="">
|
|
<? else:?>
|
|
|
|
<? endif;?>
|
|
</div>
|
|
<div class="details">
|
|
<div class="name">
|
|
<?= $product['name'];?>
|
|
<div class="attributes">
|
|
<?= $product['attributes'];?>
|
|
</div>
|
|
<div class="custom-fields">
|
|
<?= $product['custom_fields'];?>
|
|
</div>
|
|
<div class="product-message">
|
|
<?= $product['message'] != '' ? '<strong>Wiadomość:</strong> ' . $product['message'] : '';?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="prices">
|
|
<div class="price">
|
|
<?
|
|
echo \S::decimal( $product['price_brutto_promo'] ) . ' zł';
|
|
|
|
if ( $product['price_brutto_promo'] and $product['price_brutto_promo'] < $product['price_brutto'] )
|
|
echo '<u>' . \S::decimal( $product['price_brutto'] ) . ' zł</u>';
|
|
|
|
if ( $product['price_brutto_promo'] and $product['price_brutto_promo'] < $product['price_brutto'] )
|
|
$discount += \S::normalize_decimal( ( $product['price_brutto'] - $product['price_brutto_promo'] ) * $product['quantity'] );
|
|
?>
|
|
<span>x <?= $product['quantity'];?></span>
|
|
<?= \S::decimal( \S::normalize_decimal( $product['price_brutto'] * $product['quantity'] ) );?> zł
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<? $summary += \S::normalize_decimal( $product['price_brutto'] * $product['quantity'] );?>
|
|
<? endforeach;?>
|
|
<div class="basket-summary">
|
|
Wartość koszyka <span><?= \S::decimal( $summary );?> zł</span>
|
|
</div>
|
|
<? if ( $discount ):?>
|
|
<div class="basket-summary">
|
|
Rabat <span class="text-danger"><?= \S::decimal( $discount );?> zł</span>
|
|
</div>
|
|
<? endif;?>
|
|
<? if ( $this -> coupon ):?>
|
|
<div class="basket-summary">
|
|
Kod rabatowy: <span style="color: #cc0000;"><?= $this -> coupon -> name;?> - <?= $this -> coupon -> amount;?> <?= $this -> coupon -> type == 1 ? '%' : 'zł';?></span>
|
|
</div>
|
|
<? endif;?>
|
|
<div class="basket-summary">
|
|
<?= $this -> order['transport'];?> <span><?= \S::decimal( $this -> order['transport_cost'] );?> zł</span>
|
|
</div>
|
|
<div class="basket-summary big">
|
|
<?= ucfirst( \S::lang( 'razem-z-dostawa' ) );?>: <span><?= \S::decimal( $summary - $discount + $this -> order['transport_cost'] );?> zł</span>
|
|
</div>
|
|
<? endif;?>
|
|
<? if ( $this -> order['message'] ):?>
|
|
<div class="basket-summary">
|
|
Wiadomość:
|
|
<span class="comment"><?= $this -> order['message'];?></span>
|
|
</div>
|
|
<? endif;?>
|
|
</div>
|
|
</div>
|