Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {**
- * Keresés minden találatnál a termékek betöltése
- *
- * !!!VIGYÁZAT!!! Itt fekete mágia történik, mivel egy tömböt adok át neki, de alapvetően
- * Product objektummal dolgozik, csak a smarty-nak hála ugyanúgy tudja kezelni.
- * Ettől függetlenül még lehetnek benne hiányosságok.
- *}
- {if isset($products) && $products}
- {assign var='nbItemsPerLine' value=3}
- {assign var='nbItemsPerLineTablet' value=2}
- {assign var='nbItemsPerLineMobile' value=2}
- {*define numbers of product per line in other page for tablet*}
- {assign var='nbLi' value=$products|@count}
- {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
- {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
- <h1 class="page-heading product-listing">
- <span class="cat-name">
- {l s='Products' mod='lincossearchmodule'}
- </span>
- <span class="heading-counter" style="visibility: hidden">
- <span class="counter-number">
- </span>
- {if ($products|count) > 1}
- {l s='products found' mod='lincossearchmodule'}
- {else}
- {l s='product found' mod='lincossearchmodule'}
- {/if}
- </span>
- </h1>
- <div class="content_sortPagiBar">
- <div class="sortPagiBar clearfix {if isset($instant_search) && $instant_search} instant_search{/if}">
- <ul class="display hidden-xs">
- <li class="display-title">{l s='View:' mod='lincossearchmodule'}</li>
- <li id="grid"><a rel="nofollow" href="#" title="{l s='Grid' mod='lincossearchmodule'}"><i class="icon-th-large"></i>{l s='Grid' mod='lincossearchmodule'}</a></li>
- <li id="list"><a rel="nofollow" href="#" title="{l s='List' mod='lincossearchmodule'}"><i class="icon-th-list"></i>{l s='List' mod='lincossearchmodule'}</a></li>
- </ul>
- </div>
- </div>
- <!-- Products list -->
- <ul{if isset($id) && $id} id="{$id}"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}">
- {foreach from=$products item=product name=products}
- {math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
- {math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
- {math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
- {if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
- {if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
- {if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}
- <li class="ajax_block_product{if $page_name == 'index' || $page_name == 'product'} col-xs-12 col-sm-4 col-md-3{else} col-xs-12 col-sm-6 col-md-4{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}">
- <div class="product-container" itemscope itemtype="https://schema.org/Product">
- <div class="left-block">
- <div class="product-image-container">
- <a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
- <img class="replace-2x img-responsive" src="//{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} itemprop="image" />
- </a>
- <div class="product-flags">
- {hook h='displayProductListImage' product=$product}
- {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
- {if isset($product.online_only) && $product.online_only}
- <span class="online_only">{l s='Online only' mod='lincossearchmodule'}</span>
- {/if}
- {/if}
- {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
- {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
- <span class="discount">{l s='discount' mod='lincossearchmodule'}</span>
- {/if}
- </div>
- {if isset($quick_view) && $quick_view}
- <div class="quick-view-wrapper-mobile">
- <a class="quick-view-mobile" href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}">
- <i class="icon-eye-open"></i>
- </a>
- </div>
- <a class="quick-view" href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}">
- <span>{l s='Quick view' mod='lincossearchmodule'}</span>
- </a>
- {/if}
- {if (!$PS_CATALOG_MODE && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
- <div class="content_price 2" itemprop="offers" itemscope itemtype="https://schema.org/Offer">
- {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
- <span itemprop="price" class="price product-price 2">
- {* ÁFA beállítása szorzáshoz*}
- {*if $cart->id_shop_group == 1}
- {if $cart->id_shop == 4}
- {assign var="lincos_afa" value='1.19'}
- {else}
- {assign var="lincos_afa" value='1.27'}
- {/if}
- {else}
- {if $cart->id_shop == 9}
- {assign var="lincos_afa" value='1.20'}
- {else}
- {assign var="lincos_afa" value='1.22'}
- {/if}
- (1+$product.rate/100)
- {/if*}
- {if $cart->id_shop == 6}
- {*$product|print_r*}
- {/if}
- {hook h="displayProductPriceBlock" product=$product type="before_price"}
- {if !$priceDisplay}
- {convertPrice price=$product.price}
- {else}
- <span class="net-price-text">{l s='Net price' mod='lincossearchmodule'}:</span>
- <br />
- <span class="price-modify net">
- {if isset($smarty.cookies.dev)}{/if}
- {convertPrice price=$product.price_tax_exc}
- </span>
- {if $product.price_without_reduction > 0 && isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
- <br />
- {hook h="displayProductPriceBlock" product=$product type="old_price"}
- <span class="old-price product-price 22">
- {displayWtPrice p=$product.price_without_reduction}
- </span>
- {/if}
- <br>
- <span class="net-price-text">{l s='Gross price' mod='lincossearchmodule'}:</span><br/>
- <span class="price-modify brut">
- {$product.price}</span>
- <br />
- {if $product.price_without_reduction > 0 && isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
- {hook h="displayProductPriceBlock" product=$product type="old_price"}
- <span class="old-price product-price 33">
- {$product.price_without_reduction_tax_inc}
- </span>
- {/if}
- {if $product.specific_prices.reduction_type == 'percentage'}
- <br />
- <span class="price-percent-reduction 33">-{($product.specific_prices.reduction * 100)|ceil}%</span>
- {* Csak akkor mutassa meddig van az akció ha nem örökérvényű *}
- {if ($product.specific_prices.from|substr:0:10) != '0000-00-00'}
- <div class="stock-last">
- <span class="stock-last-date">{str_replace("-", ". ", $product.specific_prices.from|substr:0:10)}. - {str_replace("-", ". ", $product.specific_prices.to|substr:0:10)}., </span>
- <br>
- <span class="stock-last-text">{l s='While stocks last' mod='lincossearchmodule'}</span>
- </div>
- {/if}
- {/if}
- {/if}
- </span>
- <meta itemprop="priceCurrency" content="{$currency->iso_code}" />
- {if $PS_STOCK_MANAGEMENT && isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
- <span class="unvisible">
- {if ($product.allow_oosp || $product.quantity > 0)}
- <link itemprop="availability" href="https://schema.org/InStock" />{if $product.quantity <= 0}{if $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='In Stock' mod='lincossearchmodule'}{/if}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock' mod='lincossearchmodule'}{/if}{/if}
- {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
- <link itemprop="availability" href="https://schema.org/LimitedAvailability" />{l s='Product available with different options' mod='lincossearchmodule'}
- {else}
- <link itemprop="availability" href="https://schema.org/OutOfStock" />{l s='Out of stock' mod='lincossearchmodule'}
- {/if}
- </span>
- {/if}
- {hook h="displayProductPriceBlock" product=$product type="price"}
- {hook h="displayProductPriceBlock" product=$product type="unit_price"}
- {/if}
- </div>
- {/if}
- {if isset($product.new) && $product.new == 1}
- <a class="new-box" href="{$product.link|escape:'html':'UTF-8'}">
- <span class="new-label">{l s='New' mod='lincossearchmodule'}</span>
- </a>
- {/if}
- {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
- <a class="sale-box" href="{$product.link|escape:'html':'UTF-8'}">
- <span class="sale-label">{l s='Sale!' mod='lincossearchmodule'}</span>
- </a>
- {/if}
- </div>
- {if isset($product.is_virtual) && !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
- {hook h="displayProductPriceBlock" product=$product type="weight"}
- </div>
- <div class="right-block">
- <h5 itemprop="name">
- {if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
- <a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
- {$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
- </a>
- </h5>
- {capture name='displayProductListReviews'}{hook h='displayProductListReviews' product=$product}{/capture}
- {if $smarty.capture.displayProductListReviews}
- <div class="hook-reviews">
- {hook h='displayProductListReviews' product=$product}
- </div>
- {/if}
- <p class="product-desc" itemprop="description">
- {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
- </p>
- {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
- <div class="content_price 1">
- {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
- {hook h="displayProductPriceBlock" product=$product type='before_price'}
- <span class="price product-price">
- {if $cart->id_shop_group == '3'}
- {convertPrice price=$product.price}
- {else}
- <span class="net-price-text">{l s='Net price' mod='lincossearchmodule'}:</span>
- <br />
- <span class="price-modify net">
- {if isset($smarty.cookies.dev)}{/if}
- {convertPrice price=$product.price_tax_exc}
- </span>
- {if $product.price_without_reduction > 0 && isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
- <br />
- {hook h="displayProductPriceBlock" product=$product type="old_price"}
- <span class="old-price product-price 22">
- {displayWtPrice p=$product.price_without_reduction}
- </span>
- {/if}
- <br>
- <span class="net-price-text">{l s='Gross price' mod='lincossearchmodule'}:</span><br/>
- <span class="price-modify brut">{convertPrice price=$product.price_tax_exc*(1+$product.rate/100)}</span>
- <br />
- {if $product.price_without_reduction > 0 && isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
- {hook h="displayProductPriceBlock" product=$product type="old_price"}
- <span class="old-price product-price 33">
- {displayWtPrice p=$product.price_without_reduction*(1+$product.rate/100)}
- </span>
- {/if}
- {if $product.specific_prices.reduction_type == 'percentage'}
- <br />
- <span class="price-percent-reduction 33">-{($product.specific_prices.reduction * 100)|ceil}%</span>
- {* Csak akkor mutassa meddig van az akció ha nem örökérvényű *}
- {if ($product.specific_prices.from|substr:0:10) != '0000-00-00'}
- <div class="stock-last">
- <span class="stock-last-date">{str_replace("-", ". ", $product.specific_prices.from|substr:0:10)}. - {str_replace("-", ". ", $product.specific_prices.to|substr:0:10)}., </span>
- <br>
- <span class="stock-last-text">{l s='While stocks last' mod='lincossearchmodule'}</span>
- </div>
- {/if}
- {/if}
- {/if}
- </span>
- {*if $product.price_without_reduction > 0 && isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
- {hook h="displayProductPriceBlock" product=$product type="old_price"}
- <span class="old-price product-price 11">
- {if $cart->id_shop_group == '3'}
- {displayWtPrice p=$product.price_without_reduction*(1+$product.rate/100)}
- {else}
- {displayWtPrice p=$product.price_without_reduction}
- {/if}
- </span>
- {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"}
- {if $product.specific_prices.reduction_type == 'percentage'}
- <span class="price-percent-reduction 22">-{($product.specific_prices.reduction * 100)|ceil}%</span>
- {/if}
- {/if*}
- {hook h="displayProductPriceBlock" product=$product type="price"}
- {hook h="displayProductPriceBlock" product=$product type="unit_price"}
- {hook h="displayProductPriceBlock" product=$product type='after_price'}
- {/if}
- </div>
- {/if}
- <div class="button-container">
- {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE}
- {if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
- {capture}add=1&id_product={$product.id_product|intval}{if isset($product.id_product_attribute) && $product.id_product_attribute}&ipa={$product.id_product_attribute|intval}{/if}{if isset($static_token)}&token={$static_token}{/if}{/capture}
- <a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart' mod='lincossearchmodule'}" data-id-product-attribute="{$product.id_product_attribute|intval}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity >= 1}{$product.product_attribute_minimal_quantity|intval}{else}{$product.minimal_quantity|intval}{/if}">
- <span>{l s='Add to cart' mod='lincossearchmodule'}</span>
- </a>
- {else}
- <span class="button ajax_add_to_cart_button btn btn-default disabled">
- <span>{l s='Add to cart' mod='lincossearchmodule'}</span>
- </span>
- {/if}
- {/if}
- <a class="button lnk_view btn btn-default" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View' mod='lincossearchmodule'}">
- <span>{if (isset($product.customization_required) && $product.customization_required)}{l s='Customize' mod='lincossearchmodule'}{else}{l s='More' mod='lincossearchmodule'}{/if}</span>
- </a>
- <div class="hidden">
- <pre>
- {$product|print_r}
- </pre>
- </div>
- </div>
- {if isset($product.color_list)}
- <div class="color-list-container">{$product.color_list}</div>
- {/if}
- {if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
- {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
- <span class="availability">
- {if (($product.allow_oosp || $product.quantity > 0))}
- <span class="{if $product.quantity <= 0 && isset($product.allow_oosp) && !$product.allow_oosp} label-danger{elseif $product.quantity <= 0} label-warning{else} label-success{/if}">
- {if $product.quantity <= 0}
- {if $product.allow_oosp}
- {if isset($product.available_later) && $product.available_later}
- {$product.available_later}
- {else}
- {l s='In Stock' mod='lincossearchmodule'}
- {/if}
- {else}
- {l s='Out of stock' mod='lincossearchmodule'}
- {/if}
- {else}
- {if isset($product.available_now) && $product.available_now}
- {$product.available_now}
- {else}
- {l s='In Stock' mod='lincossearchmodule'}
- {/if}
- {/if}
- </span>
- {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
- <span class="label-warning">
- {l s='Product available with different options' mod='lincossearchmodule'}
- </span>
- {else}
- <span class="label-danger">
- {l s='Out of stock' mod='lincossearchmodule'}
- </span>
- {/if}
- </span>
- {/if}
- {/if}
- </div>
- {if $page_name != 'index'}
- <div class="functional-buttons clearfix">
- {hook h='displayProductListFunctionalButtons' product=$product}
- {if isset($comparator_max_item) && $comparator_max_item}
- <div class="compare">
- <a class="add_to_compare" href="{$product.link|escape:'html':'UTF-8'}" data-id-product="{$product.id_product}">{l s='Add to Compare' mod='lincossearchmodule'}</a>
- </div>
- {/if}
- </div>
- {/if}
- </div><!-- .product-container> -->
- </li>
- {/foreach}
- </ul>
- {addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
- {addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
- {addJsDef comparator_max_item=$comparator_max_item}
- {addJsDef comparedProductsIds=$compared_products}
- {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement