Files
shopPRO/templates/shop-product/products-top.php
Jacek Pyziak 69e78ca248 ver. 0.294: Remove all 12 legacy autoload/shop/ classes (~2363 lines)
Complete Domain-Driven Architecture migration:
- Phase 1-4: Transport, ProductSet, Coupon, Shop, Search, Basket,
  ProductCustomField, Category, ProductAttribute, Promotion
- Phase 5: Order (~562 lines) + Product (~952 lines)
- ~20 Product methods migrated to ProductRepository
- Apilo sync migrated to OrderAdminService
- Production hotfixes: stale Redis cache (prices 0.00), unqualified
  Product:: refs in LayoutEngine, object->array template conversion
- AttributeRepository::getAttributeValueById() Redis cache added

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 02:05:39 +01:00

73 lines
1.8 KiB
PHP

<? $hash = md5( time() . rand( 0, 9999999999 ) );?>
<? if ($this -> products) : ?>
<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>
<? endif; ?>