{* $Id: wishlist.tpl 2302 2006-10-21 13:12:37Z lantan $ *} {capture name="mainbox"} {if $wishlist_products} {if $smarty.capture.js_loaded != "Y"} {capture name="js_loaded"}Y{/capture} {/if}
{foreach from=$wishlist_products item="cp" key="key"} {/foreach}
{include file="common_templates/image.tpl" image_width=$settings.Appearance.thumbnail_width obj_id=$key images=$cp.main_pair object_type="product"}
{$cp.product|escape:html} {$lang.remove} {if $cp.product_code}
{$lang.sku}: {$cp.product_code}
{/if}

{$cp.short_description|truncate:200:"..."}

{************************************ Discount label ****************************} {if $cp.discount && $cp.price != 0} {/if} {* / Discount label *}
{******************************* List price, Old Price **************************} {if $cp.discount && $cp.price != 0}
{$lang.old_price}: {include file="common_templates/price.tpl" value=$cp.price span_id="original_price_`$key`" class="list-price"}
{else} {if $cp.list_price > $cp.price && $cp.price != 0} {math equation="list_price - price" list_price=$cp.list_price price=$cp.price assign="absolute_discount"}
{$lang.list_price}: {include file="common_templates/price.tpl" value=$cp.list_price}
{/if} {/if} {************************ Discounted Price, Our Price, Price ********************} {if $cp.price != 0 || $product.zero_price_action == 'P'}
{if $cp.discount && $cp.price != 0}{$lang.discounted_price} {math equation="price - discount" discount=$cp.discount price=$cp.price assign="our_price"} {if $our_price>=0} {include file="common_templates/price.tpl" value=$our_price span_id="discounted_price_`$key`"} {else} {include file="common_templates/price.tpl" value=0 span_id="discounted_price_`$key`"} {/if} {else} {if $cp.list_price > $cp.price && $cp.price != 0}{$lang.our_price}{else}{$lang.price}{/if}: {include file="common_templates/price.tpl" value=$cp.price span_id="original_price_`$key`"} {/if}
{/if} {************************************* You Save: *******************************} {if $cp.discount && $cp.price != 0}
{$lang.you_save}: {include file="common_templates/price.tpl" value=$cp.discount span_id="save_`$key`" class="list-price"}
{else} {if $cp.list_price > $cp.price && $cp.price != 0}
{$lang.you_save}: {include file="common_templates/price.tpl" value=$absolute_discount span_id="save_`$key`" class="list-price"}
{/if} {/if}
   
   {if $cp.discount_type == "A"} {math equation="0 - (100 - ((price / old_price) * 100))" old_price=$cp.price price=$our_price format="%d" assign="disc_value"} {else} {math equation="0 - discount" discount=$cp.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' spanm_id="discount_label_`$key`" class="discount-label-text"} {else} {include file="common_templates/modifier.tpl" mod_type="P" mod_value=-100 non_zeros='Y' spanm_id="discount_label_`$key`" class="discount-label-text"} {/if}  
{include file="products_pages/product_options.tpl" product_options=$cp.product_options product=$cp name="product_data" id=$key location="cart"}

{include file="buttons/add_to_cart.tpl" but_onclick="javascript: if (fn_check_exceptions(`$key`)) `$ldelim` document.wishlist_form.`$mode_name`.value='add'; document.wishlist_form.`$target_name`.value='cart'; document.getElementById('amount_`$key`').value='1'; document.wishlist_form.submit(); `$rdelim` else `$ldelim` alert(cannot_buy); `$rdelim`"}

{include file="buttons/clear_wishlist.tpl" but_href="$index_script?$target_name=wishlist&$mode_name=clear"}     {include file="buttons/continue_shopping.tpl" but_href=$continue_url|default:$index_script but_arrow="on"}
 

{else}
{$lang.text_wishlist_empty}

{include file="buttons/continue_shopping.tpl" but_href=$continue_url|default:$index_script but_arrow="on"}

{/if} {/capture} {include file="common_templates/mainbox.tpl" title=$lang.wishlist_content content=$smarty.capture.mainbox} {if !$wishlist_products && $recently_viewed_products}
{capture name="mainbox"} {if $settings.Appearance.columns_in_products_list > 1} {include file="products_pages/products_multicolumns.tpl" products=$recently_viewed_products form_prefix="recent" columns=$settings.Appearance.columns_in_products_list} {else} {include file="products_pages/products.tpl" products=$recently_viewed_products form_prefix="recent" no_sorting="Y" no_pagination="Y"} {/if} {/capture} {include file="common_templates/mainbox.tpl" title=$lang.recent_products content=$smarty.capture.mainbox} {/if}