- 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.
69 lines
3.6 KiB
PHP
69 lines
3.6 KiB
PHP
<? global $lang_id;?>
|
|
<?
|
|
$this -> product['language']['seo_link'] ? $url = '/' . $this -> product['language']['seo_link'] : $url = '/p-' . $this -> product['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> product['language']['name'] );
|
|
|
|
if ( \Shared\Helpers\Helpers::get_session( 'current-lang' ) != ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() and $url != '#' )
|
|
$url = '/' . \Shared\Helpers\Helpers::get_session( 'current-lang' ) . $url;
|
|
?>
|
|
<div class="product-mini <?= $this -> product_mini_class;?>">
|
|
<? if ( $this -> product['new_to_date'] and $this -> product['new_to_date'] >= date( 'Y-m-d' ) ):?>
|
|
<div class="new"><?= \Shared\Helpers\Helpers::lang( 'nowosc' );?></div>
|
|
<? endif;?>
|
|
<a href="<?= $url;?>">
|
|
<div class="img">
|
|
<? if ( file_exists( substr( $this -> product['images'][0]['src'], 1 ) ) ):?>
|
|
<? if ( $this -> class == 'item' ):?>
|
|
<img class="<?= $this -> product_mini_class == 'swiper-slide' ? '' : 'owl-lazy';?>" src="/thumb/500/0/<?= substr( $this -> product['images'][0]['src'], 1, strlen( $this -> product['images'][0]['src'] ) );?>" alt="<?= $this -> product['images'][0]['alt'];?>">
|
|
<? else:?>
|
|
<img class="first" src="/thumb/500/0/<?= substr( $this -> product['images'][0]['src'], 1, strlen( $this -> product['images'][0]['src'] ) );?>" alt="<?= $this -> product['images'][0]['alt'];?>">
|
|
<? if ( file_exists( substr( $this -> product['images'][1]['src'], 1 ) ) ):?>
|
|
<img class="second" src="/thumb/1000/0/<?= substr( $this -> product['images'][1]['src'], 1, strlen( $this -> product['images'][1]['src'] ) );?>" alt="<?= $this -> product['images'][1]['alt'];?>">
|
|
<? else:?>
|
|
<img class="second" src="/thumb/1000/0/<?= substr( $this -> product['images'][0]['src'], 1, strlen( $this -> product['images'][0]['src'] ) );?>" alt="<?= $this -> product['images'][0]['alt'];?>">
|
|
<? endif;?>
|
|
<? endif;?>
|
|
<? else:?>
|
|
|
|
<? endif;?>
|
|
</div>
|
|
<div class="product-details">
|
|
<h2 class="name">
|
|
<?= $this -> product['language']['name'];?>
|
|
</h2>
|
|
<div class="prices">
|
|
<?
|
|
$prices = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->getDefaultCombinationPrices( $this -> product );
|
|
if ( $prices )
|
|
{
|
|
if ( $prices['price_brutto_promo'] ):?>
|
|
<div class="price-old">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $prices['price_brutto'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<div class="price">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $prices['price_brutto_promo'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<? else:?>
|
|
<div class="price">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $prices['price_brutto'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<? endif;
|
|
}
|
|
else
|
|
{
|
|
if ( $this -> product['price_brutto_promo'] ):?>
|
|
<div class="price-old">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $this -> product['price_brutto'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<div class="price">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $this -> product['price_brutto_promo'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<? else:?>
|
|
<div class="price">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $this -> product['price_brutto'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<? endif;
|
|
};?>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</div>
|