{* $Id: discount_products.tpl 1790 2006-05-16 10:44:26Z lantan $ *} {** discounted products section **}
{capture name="mainbox"}
{include file="discounts_pages/discount_details.tpl" discount=$discount}

{if 'manage_discounts'|fn_check_privileges:true} {include file="buttons/update.tpl" but_onclick="javascript:document.discounted_products_form.submit()"} {/if}

{include file="common_templates/subheader.tpl" title=$lang.defined_discounted_products} {if $discount.value_type == "P"} {/if} {if $discounted_products} {foreach from=$discounted_products item=product} {if $discount.value_type == "P"} {math equation="price - disc_price" disc_price=$product.discounted_price|default:"0" price=$product.price|default:"0" assign="product_discount"} {/if} {/foreach} {else} {/if}
{$lang.product_name} {$lang.price} {$lang.discounted_price}{$lang.discount} ({$currencies.$primary_currency.symbol})
{$product.product} {$product.price} {$product.discounted_price} {$product_discount}

{$lang.text_no_products_defined}

{if $discounted_products} {if 'manage_discounts'|fn_check_privileges:true}

{include file="buttons/delete_selected.tpl" but_onclick="javascript: fn_delete_selected('discounted_products_form','delete_discounted_products', true);"}

{/if} {/if}

{include file="common_templates/subheader.tpl" title=$lang.add_products_to_section} {capture name="section"} {include file="products_pages/products_search_form.tpl" target=$target mode=$mode category_id=$smarty.get.category_id|escape:'HTML' search_products="Y" page_part="discounted_products" discount_id=$discount.discount_id} {/capture} {include file="common_templates/section.tpl" section_title=$lang.search_for_products section_content=$smarty.capture.section} {if $smarty.get.search_products == 'Y'} {if $products}
{/if} {include file="products_pages/products_list.tpl" products=$products form_name="add_discounted_products" checkbox_id="add_discounted_product_checkbox" pagination_suffix="#add_discounted_products"} {if $products} {if 'manage_discounts'|fn_check_privileges:true}

{include file="buttons/add_products.tpl" but_onclick="javascript: if (fn_check_selected('add_discounted_products','add_discounted_product_checkbox')) document.add_discounted_products.submit();"} {/if}
{/if} {/if} {/capture} {include file="common_templates/mainbox.tpl" title=$lang.discounted_products content=$smarty.capture.mainbox} {** /discounted products section **}