{* $Id: product_options.tpl 1895 2006-06-07 11:28:24Z zeke $ *} {** Product options section **}
{if $mode == "option_details"} {capture name="mainbox"} {include file="common_templates/subheader.tpl" title=$lang.option_details}
 {$lang.position}   {$lang.option_name}   {$lang.description}   {$lang.type} 
{include file="products_pages/option_types.tpl" name="option_data[option_type]" value=$option.option_type tag_id="option_variants"}

{include file="common_templates/subheader.tpl" title=$lang.option_variants} {if $option.option_type != "C"} {/if} {if $option.option_type != "C"} {/if} {foreach from=$option.variants item="vr"} {if $option.option_type != "C"} {/if} {if $option.option_type != "C" || ($option.option_type == "C" && $vr.position == "1")} {/if} {/foreach} {if $option.option_type != "C"} {/if}
  {include file="buttons/multiple_buttons.tpl" item_id="variants_for_existing" tag_level="1"}

{if 'manage_catalog'|fn_check_privileges:true}
{include file="buttons/update.tpl" but_onclick="javascript:document.product_options_form.submit();"}     {include file="buttons/delete_selected.tpl" but_onclick="javascript:fn_delete_selected('product_options_form','delete','','del_cbox','$action_name');"}
{if $product_ref}
{$lang.product}: {$product_ref.name}
{/if}

{/if} {/capture} {include file="common_templates/mainbox.tpl" title=$option.option_name content=$smarty.capture.mainbox} {elseif $mode == "inventory"} {** include fileuploader **} {include file="common_templates/file_browser.tpl"} {** /include fileuploader **} {capture name="mainbox"} {include file="common_templates/create_thumbnails.tpl" width=$settings.Thumbnails.product_thumbnail_width option_name="product_thumbnail_width"} {include file="common_templates/pagination.tpl"} {if $inventory} {if $product_inventory == "O"} {/if} {foreach from=$inventory item="i"} {if $product_inventory == "O"} {else} {/if} {/foreach}
{$lang.combination}{$lang.amount_in_stock}{$lang.additional__option_thumbnail} {$lang.popup_larger_image}
{foreach from=$i.combination item="c" key="k"} {/foreach}
{$product_options.$k.option_name}: {if $product_options.$k.option_type == "C"} [{if $product_options.$k.variants.$c.position == "1"}{$lang.yes}{else}{$lang.no}{/if}] {else} {$product_options.$k.variants.$c.variant_name} {/if}

{include file="products_pages/product_image.tpl" image_id=$i.image_pairs.image_id image=$i.image_pairs.image_size image_file=$i.icon image_width=85} {$lang.delete_image}

   {assign var="icn_name" value="image_pairs[`$i.image_pairs.pair_id`][`$i.image_pairs.image_id`]"}

{include file="common_templates/fileuploader.tpl" selector_index=$i.image_pairs.pair_id var_name=$icn_name prefix="i"}

{include file="products_pages/product_image.tpl" image_id=$i.image_pairs.detailed_id image=$i.image_pairs.detailed_size image_mode="detailed" image_file=$i.detailed image_width=85} {$lang.delete_image}

   {assign var="det_name" value="image_detailed_pairs[`$i.image_pairs.pair_id`][`$i.image_pairs.detailed_id`]"}

{include file="common_templates/fileuploader.tpl" selector_index=$i.image_pairs.pair_id var_name=$det_name prefix="d"}

{if 'manage_catalog'|fn_check_privileges:true}
{include file="buttons/update.tpl" but_onclick="javascript: document.product_options_form.`$action_name`.value='update'; document.product_options_form.submit();"}   {include file="buttons/delete_selected.tpl" but_onclick="javascript:fn_delete_selected('product_options_form','delete', false, 'delete_checkbox', '$action_name');"}
{/if} {/if} {include file="common_templates/pagination.tpl"} {if 'manage_catalog'|fn_check_privileges:true}
{include file="buttons/button.tpl" but_text=$lang.rebuild_combinations but_onclick="javascript: document.product_options_form.`$action_name`.value='rebuild_combinations'; document.product_options_form.submit();"}


{/if} {include file="common_templates/subheader.tpl" title=$lang.add_new_combination} {if $product_inventory == "O"} {/if} {if $product_inventory == "O"} {/if}
{foreach from=$product_options item="option" name="add_inv_fe"} {if $option.inventory=="Y"} {/if} {/foreach}
{$option.option_name} {if $option.option_type == 'C'} {else} {/if}
{if $product_inventory != "O"} {/if}
{include file="buttons/multiple_buttons.tpl" item_id="new_item"}
{if 'manage_catalog'|fn_check_privileges:true}

{include file="buttons/add_new.tpl" but_onclick="javascript: document.product_options_form.`$action_name`.value='add'; document.product_options_form.submit();"} {/if} {/capture} {include file="common_templates/mainbox.tpl" title=$lang.inventory content=$smarty.capture.mainbox} {/if}
{** /Product options section **}