- 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.
68 lines
1.7 KiB
PHP
68 lines
1.7 KiB
PHP
<? $hash = md5( time() . rand( 0, 9999999999 ) );?>
|
|
<div class="products-box-<?= $hash;?>">
|
|
<div class="swiper">
|
|
<div class="swiper-wrapper">
|
|
<?
|
|
foreach ( $this -> products as $product ):
|
|
if ( $product -> status ):
|
|
echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
|
|
'product' => $product,
|
|
'class' => 'item',
|
|
'product_mini_class' => 'swiper-slide'
|
|
] );
|
|
endif;
|
|
endforeach;
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="swiper-button-next products-box-<?= $hash;?>-next"></div>
|
|
<div class="swiper-button-prev products-box-<?= $hash;?>-prev"></div>
|
|
</div>
|
|
<script class="footer" type="text/javascript">
|
|
$( function()
|
|
{
|
|
if( $( ".products-box-<?= $hash;?> .swiper").length ) {
|
|
const swiper<?= $hash;?> = new Swiper(".products-box-<?= $hash;?> .swiper", {
|
|
slidesPerView: 6,
|
|
spaceBetween: 30,
|
|
initialSlide : 1,
|
|
centeredSlides: true,
|
|
lazy: true,
|
|
pagination: {
|
|
el: ".swiper-pagination",
|
|
clickable: true,
|
|
},
|
|
navigation: {
|
|
nextEl: ".products-box-<?= $hash;?>-next",
|
|
prevEl: ".products-box-<?= $hash;?>-prev",
|
|
},
|
|
|
|
breakpoints: {
|
|
1400: {
|
|
slidesPerView: 6,
|
|
},
|
|
1200: {
|
|
slidesPerView: 5,
|
|
},
|
|
991: {
|
|
slidesPerView: 4,
|
|
},
|
|
576: {
|
|
slidesPerView: 3,
|
|
},
|
|
300: {
|
|
slidesPerView: 2,
|
|
},
|
|
200: {
|
|
slidesPerView: 1,
|
|
}
|
|
},
|
|
on: {
|
|
slideChange: function() {
|
|
observer.observe();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script>
|