{* $Id: products.tpl 1291 2006-02-03 16:44:20Z seva $ *} {if $products} {capture name="mainbox"} {if !$no_sorting} {include file="products_pages/sorting.tpl"} {/if} {if !$no_pagination} {include file="common_templates/pagination.tpl"} {/if} {if $smarty.capture.js_loaded != "Y"} {capture name="js_loaded"}Y{/capture} {/if} {foreach from=$products item=product key=key} {assign var="id" value=$product.product_id}
{include file="products_pages/product_image.tpl" product=$product image_width=$settings.Appearance.thumbnail_width} {$lang.view_details} ››    {$product.product}
{if $product.product_code}
{$lang.sku}: {$product.product_code}

{/if}
{$product.short_description|truncate:280:"... `$lang.more_link`"}

{if $product.discount && $product.price != 0} {/if}
{if $product.discount && $product.price != 0}
{$lang.old_price}: {include file="common_templates/price.tpl" value=$product.price}
{else} {if $product.list_price > $product.price && $product.price != 0} {math equation="list_price - price" list_price=$product.list_price price=$product.price assign="absolute_discount"}
{$lang.list_price}: {include file="common_templates/price.tpl" value=$product.list_price}
{/if} {/if} {if $product.price != 0 || $settings.General.zero_price_action == 'permit'}
{if $product.discount && $product.price != 0}{$lang.discounted_price} {math equation="price - discount" discount=$product.discount price=$product.price assign="our_price"} {if $our_price>=0} {include file="common_templates/price.tpl" value=$our_price span_id="price_display_`$product.product_id`"} {else} {include file="common_templates/price.tpl" value=0 span_id="price_display_`$product.product_id`"} {/if} {else} {if $product.list_price > $product.price && $product.price != 0}{$lang.our_price}{else}{$lang.price}{/if}: {include file="common_templates/price.tpl" value=$product.price span_id="price_display_`$product.product_id`"} {/if}
{/if} {if $product.discount && $product.price != 0}
{$lang.you_save}: {include file="common_templates/price.tpl" value=$product.discount}
{else} {if $product.list_price > $product.price && $product.price != 0}
{$lang.you_save}: {include file="common_templates/price.tpl" value=$absolute_discount}
{/if} {/if}
   
   {if $product.discount_type == "A"} {math equation="0 - (100 - ((price / old_price) * 100))" old_price=$product.price price=$our_price format="%d" assign="disc_value"} {else} {math equation="0 - discount" discount=$product.discount_value assign="disc_value"} {/if} {if $disc_value > -100} {include file="common_templates/modifier.tpl" mod_type="P" mod_value=$disc_value non_zeros='Y'} {else} {include file="common_templates/modifier.tpl" mod_type="P" mod_value=-100 non_zeros='Y'} {/if}  

{if $settings.General.inventory_tracking == 'Y' && $product.amount <= 0 && $product.is_edp != 'Y' && $product.tracking == 'B'}
{$lang.text_out_of_stock}
{else} {include file="products_pages/buy_now.tpl"} {/if}
   {$lang.top} 

 


{/foreach} {if !$no_pagination} {include file="common_templates/pagination.tpl"} {/if} {/capture} {if !$title} {$smarty.capture.mainbox} {else} {include file="common_templates/mainbox.tpl" title=$title content=$smarty.capture.mainbox} {/if} {/if}