first commit
This commit is contained in:
18
templates/shop-product/promoted-products.php
Normal file
18
templates/shop-product/promoted-products.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<? global $lang_id;?>
|
||||
<div class="box-title"><?= ucfirst( \S::lang( 'polecane-produkty' ) );?></div>
|
||||
<div class="content">
|
||||
<? if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):?>
|
||||
<?
|
||||
$product = \shop\Product::getFromCache( $product_id, $lang_id );
|
||||
|
||||
$product -> languages[$lang_id]['seo_link'] ? $url = '/' . $product -> languages[$lang_id]['seo_link'] : $url = '/p-' . $product['id'] . '-' . \S::seo( $product -> languages[$lang_id]['name'] );
|
||||
|
||||
if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language() and $url != '#' )
|
||||
$url = '/' . \S::get_session( 'current-lang' ) . $url;
|
||||
?>
|
||||
<?= \Tpl::view( 'shop-product/product-mini', [
|
||||
'product' => $product,
|
||||
'class' => 'col-12 col-sm-4 col-md-4 col-lg-3'
|
||||
] );?>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user