Add view classes for articles, banners, languages, menu, newsletter, containers, shop categories, clients, payment methods, products, and search
- Created `Articles` class for rendering article views including full articles, miniature lists, and news sections. - Added `Banners` class for handling banner displays. - Introduced `Languages` class for rendering language options. - Implemented `Menu` class for rendering page and menu structures. - Developed `Newsletter` class for newsletter rendering. - Created `Scontainers` class for rendering specific containers. - Added `ShopCategory` class for managing shop category views and pagination. - Implemented `ShopClient` class for client-related views including address management and login forms. - Created `ShopPaymentMethod` class for displaying payment methods in the basket. - Added `ShopProduct` class for generating product URLs. - Introduced `ShopSearch` class for rendering a simple search form. - Added `.htaccess` file in the plugins directory to enhance security by restricting access to sensitive files and directories.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<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>
|
||||
Data zamówienia: <span><?= \Shared\Helpers\Helpers::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>
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<div class="top-second">
|
||||
<div class="column">
|
||||
<h5><?= ucfirst( \S::lang( 'dane-do-dostawy' ) );?></h5>
|
||||
<h5><?= ucfirst( \Shared\Helpers\Helpers::lang( 'dane-do-dostawy' ) );?></h5>
|
||||
<p>
|
||||
<?= $this -> order['client_surname'];?> <?= $this -> order['client_name'];?><br />
|
||||
<?= $this -> order['client_street'];?><br />
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="column">
|
||||
<? if ( $this -> order['firm_name'] ):?>
|
||||
<h5><?= \S::lang( 'dane-do-faktury' );?>:</h5>
|
||||
<h5><?= \Shared\Helpers\Helpers::lang( 'dane-do-faktury' );?>:</h5>
|
||||
<p>
|
||||
<?= $this -> order['firm_name'];?><br />
|
||||
<?= $this -> order['firm_street'];?><br />
|
||||
@@ -39,7 +39,7 @@
|
||||
<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'] );?>
|
||||
<? $product_tmp = (new \Domain\Product\ProductRepository($GLOBALS['mdb']))->findCached( $product['product_id'], $lang['id'] );?>
|
||||
<div class="basket-product">
|
||||
<div class="image">
|
||||
<? if ( file_exists( substr( $product_tmp['images'][0]['src'], 1 ) ) ):?>
|
||||
@@ -65,39 +65,42 @@
|
||||
<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'] );
|
||||
$_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 '<u>' . \Shared\Helpers\Helpers::decimal( $_base ) . ' zł</u>';
|
||||
$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;
|
||||
?>
|
||||
<span>x <?= $product['quantity'];?></span>
|
||||
<?= \S::decimal( \S::normalize_decimal( $product['price_brutto'] * $product['quantity'] ) );?> zł
|
||||
<?= \Shared\Helpers\Helpers::decimal( \Shared\Helpers\Helpers::normalize_decimal( $effective_price * $product['quantity'] ) );?> zł
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? $summary += \S::normalize_decimal( $product['price_brutto'] * $product['quantity'] );?>
|
||||
<? $summary += \Shared\Helpers\Helpers::normalize_decimal( $_base * $product['quantity'] );?>
|
||||
<? endforeach;?>
|
||||
<div class="basket-summary">
|
||||
Wartość koszyka <span><?= \S::decimal( $summary );?> zł</span>
|
||||
Wartość koszyka <span><?= \Shared\Helpers\Helpers::decimal( $summary );?> zł</span>
|
||||
</div>
|
||||
<? if ( $discount ):?>
|
||||
<div class="basket-summary">
|
||||
Rabat <span class="text-danger"><?= \S::decimal( $discount );?> zł</span>
|
||||
Rabat <span class="text-danger"><?= \Shared\Helpers\Helpers::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>
|
||||
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>
|
||||
<?= $this -> order['transport'];?> <span><?= \Shared\Helpers\Helpers::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>
|
||||
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'razem-z-dostawa' ) );?>: <span><?= \Shared\Helpers\Helpers::decimal( $summary - $discount + $this -> order['transport_cost'] );?> zł</span>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> order['message'] ):?>
|
||||
|
||||
Reference in New Issue
Block a user