{if ($smarty.foreach.prods.index+1) % 3 eq 0} {assign var=clear value=true} {elseif $smarty.foreach.prods.last} {assign var=clear value=true} {else} {assign var=clear value=false} {/if}

{if $compare_enabled} {/if}

{if $product.thumb and $product.thumb ne $smarty.const.NO_PICTURE} {$product.alt|replace:' {elseif $product.img} {$product.alt|replace:' {else} {$product.alt|replace:' {/if}
{if $product.img} {$LABEL.link_enlarge} {else}   {/if}

{if $product.short_descr} {capture name=short_descr}{strip} {$product.short_descr|truncate:90:"...":true} {/strip}{/capture} {if $CONFIG.settings.prod_allow_html_short_descr eq 'on'} {$smarty.capture.short_descr|close_tags} {else} {$smarty.capture.short_descr|nl2br} {/if} {else} {$LABEL.lbl_short_descr_is_empty} {/if}

{if $CONFIG.settings.prices_for_only_registered eq 'on' && !$smarty.session.customer_info.id} {include file="_system_/helptip.html" id="product-`$prod_id`-price-`$prod_from`" text=$LABEL.tip_prices_for_only_registered label="`$LABEL.lbl_price`"} {else} {if $CONFIG.settings.prices_same_font_size eq 'on'} {$product.$PRODUCT_PRICE_FIELD} {else} {strip} {if $SHOP_CURRENCY.left_side eq 'Y'}{$SHOP_CURRENCY.short_name}{/if} {$product.price_int}{if $product.price_fract}{$product.price_fract}{/if} {if $SHOP_CURRENCY.left_side ne 'Y'}{$SHOP_CURRENCY.short_name}{/if} {/strip} {/if} {/if} {if $product.discount and $CONFIG.settings.prodlist_show_discount eq 'on'}

{$LABEL.lbl_discount}: {$product.discount|replace:"-":""}

{elseif $smarty.session.products_list.featured[$product.id] and $prod_from ne 'featured'}

{$LABEL.lbl_featured2}

{elseif $smarty.session.products_list.bestsellers[$product.id] and $prod_from ne 'bestsellers'}

{$LABEL.lbl_bestseller}

{elseif $smarty.session.products_list.newest[$product.id] and $prod_from ne 'newest'}

{$LABEL.lbl_newest2}

{elseif $CONFIG.modules.discussions.avail eq 'Y'}
{math equation="round(r * 4)" r=$product.rating|default:0 assign=rated_index} {section name=rating loop=21 start=1} {/section}
{else}   {/if}
{if (($CONFIG.modules.prod_options.avail eq 'Y' and $product.options) or ($product.qty lte 0 and $product.qty ne '')) and $prod_from ne 'acquired'} {assign var=show_cart_button value=false} {else} {assign var=show_cart_button value=true} {/if} {if $kupivkredit_is_active}

{if $show_cart_button} {else} {/if}

{/if}
{assign var=form_id value="product_form_`$product.id`_`$prod_from`"}
{if not $show_cart_button} {include file="_system_/button.html" link=$prod_href title=$LABEL.link_see_details} {else}
{if $product.egood eq 'Y'}   {else}   {/if} {include file="_system_/button.html" js="CartBox.addProduct(`$prod_id`, `$category_id`, '`$form_id`'); document.getElementById('`$form_id`').prod_qty.value = 1;" id="sv-button-cart-`$prod_id`" title=$LABEL.link_buy}
{/if}
{if $product.egood eq 'Y' and $product.is_free eq 'Y' and $CONFIG.settings.free_egoods_allowed eq 'on' and $product.egood_pins ne 'Y'} {assign var=download_link_visible value=true} {else} {assign var=download_link_visible value=false} {/if}

{if $prod_from eq 'wishlist' and $smarty.session.customer_info.id} {assign var=tmp_link value=$LINKS->Account('wishlist')} {$LABEL.link_delete} {elseif $prod_from eq 'acquired' and $smarty.session.customer_info.id} {$LABEL.link_delete} {elseif $download_link_visible} {$LABEL.link_download} {elseif $CONFIG.modules.wishlist.avail eq 'Y'} {$LABEL.link_to_wishlist} {/if}

{if $prod_from eq 'acquired'} {foreach from=$product.options item=var_id} {/foreach} {elseif $CONFIG.modules.prod_options.avail eq 'Y' and $product.options and $product.def_vars_selected} {foreach from=$product.options item=option} {foreach from=$option.variants item=variant} {if $product.def_vars_selected[$variant.id]} {/if} {/foreach} {/foreach} {/if}
{if $clear}
{/if}