- Created Articles.php for rendering article views including full articles, miniature lists, and news sections. - Added Banners.php for handling banner displays. - Introduced Languages.php for rendering language options. - Implemented Menu.php for dynamic menu rendering. - Developed Newsletter.php for newsletter view rendering. - Created Scontainers.php for rendering specific containers. - Added ShopCategory.php for category descriptions and product listings. - Introduced ShopClient.php for managing client-related views such as address editing and order history. - Implemented ShopPaymentMethod.php for displaying payment methods in the basket. - Created ShopProduct.php for generating product URLs. - Added ShopSearch.php for rendering a simple search form. - Added .htaccess file to enhance security by restricting access to sensitive files and directories.
60 lines
3.0 KiB
PHP
60 lines
3.0 KiB
PHP
<? global $lang_id;?>
|
|
<? if ( \Shared\Helpers\Helpers::is_array_fix( $this -> products ) ):?>
|
|
<h2>Dobierz inne produkty do kompletu</h2>
|
|
<? endif;?>
|
|
<div class="product-sets">
|
|
<? $productRepo = new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ); ?>
|
|
<? if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
|
|
$product = $productRepo->findCached( $product_id, $lang_id );
|
|
|
|
$product['language']['seo_link'] ? $url = '/' . $product['language']['seo_link'] : $url = '/p-' . $product['id'] . '-' . \Shared\Helpers\Helpers::seo( $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">
|
|
<? if ( $product['new_to_date'] and $product['new_to_date'] >= date( 'Y-m-d' ) ):?>
|
|
<div class="new"><?= \Shared\Helpers\Helpers::lang( 'nowosc' );?></div>
|
|
<? endif;?>
|
|
<a href="<?= $url;?>" class="a-img">
|
|
<div class="img">
|
|
<? if ( file_exists( substr( $product['images'][0]['src'], 1 ) ) ):?>
|
|
<? if ( $this -> class == 'item' ):?>
|
|
<img class="owl-lazy" data-src="/thumb/490/0/<?= substr( $product['images'][0]['src'], 1, strlen( $product['images'][0]['src'] ) );?>" alt="<?= $product['images'][0]['alt'];?>">
|
|
<? else:?>
|
|
<img class="lozad first" data-src="/thumb/490/0/<?= substr( $product['images'][0]['src'], 1, strlen( $product['images'][0]['src'] ) );?>" alt="<?= $product['images'][0]['alt'];?>">
|
|
<? if ( file_exists( substr( $product['images'][1]['src'], 1 ) ) ):?>
|
|
<img class="lozad second" data-src="/thumb/490/0/<?= substr( $product['images'][1]['src'], 1, strlen( $product['images'][1]['src'] ) );?>" alt="<?= $product['images'][1]['alt'];?>">
|
|
<? else:?>
|
|
<img class="lozad second" data-src="/thumb/490/0/<?= substr( $product['images'][0]['src'], 1, strlen( $product['images'][0]['src'] ) );?>" alt="<?= $product['images'][0]['alt'];?>">
|
|
<? endif;?>
|
|
<? endif;?>
|
|
<? else:?>
|
|
|
|
<? endif;?>
|
|
</div>
|
|
</a>
|
|
<div class="product-details">
|
|
<h2 class="name">
|
|
<a href="<?= $url;?>" class="a-name">
|
|
<?= $product['language']['name'];?>
|
|
</a>
|
|
</h2>
|
|
<div class="prices">
|
|
<? if ( $product['price_brutto_promo'] ):?>
|
|
<div class="price-old">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $product['price_brutto'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<div class="price">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $product['price_brutto_promo'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<? else:?>
|
|
<div class="price">
|
|
<?= \Shared\Helpers\Helpers::shortPrice( $product['price_brutto'] );?> <span class="small">zł</span>
|
|
</div>
|
|
<? endif;?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<? endforeach; endif;?>
|
|
</div>
|