{config_load file='variables.conf'} {* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *} {default_translation_domain domain='bo.default'} {loop name="product_edit" type="product" visible="*" id=$product_id backend_context="1" lang=$edit_language_id}

{* <---- FIXME Lame ! *}

{intl l="To use features or attributes on this product, please select a product template. You can define product templates in the configuration section of the administration." tpl_mgmt_url={url path='/admin/configuration/templates'} }

{intl l='Current product template'} :
{* Check if a product template is defined *}
{include file = "includes/inner-form-toolbar.html" hide_submit_buttons = false page_url = "{url path='/admin/products/update' product_id=$ID}" close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}" } {* -- Begin attributes management ------------------------------- *}

{intl l='Product Attributes'}

{if $TEMPLATE} {intl l="You can change template attributes and their positions in the template configuration page." tpl_mgmt_url={url path='/admin/configuration/templates/update' template_id=$TEMPLATE} } {else} {intl l="You can change attributes and their positions in the attributes configuration page." tpl_mgmt_url={url path='/admin/configuration/attributes'} } {/if}

{intl l='ID'} | {intl l='Attribute Name'} {hook name="product.attributes-table-header" location="product_attributes_table_header" }
--- | ---
{loop name="product-attributes" type="attribute" order="manual" product=$product_id backend_context="1" lang="$edit_language_id"}
{$ID} | {$TITLE} {hook name="product.attributes-table-row" location="product_attributes_table_row" }
{/loop} {elseloop rel="product-attributes"}
{intl l="This product template does not contains any features"}
{/elseloop}

{* -- Begin features management ---------------------------------- *}

{intl l='Product Features'}

{if $TEMPLATE} {intl l="You can change templates features and their positions in the template configuration page." tpl_mgmt_url={url path='/admin/configuration/templates/update' template_id=$TEMPLATE} } {else} {intl l="You can change feature and their positions in the features configuration page." tpl_mgmt_url={url path='/admin/configuration/features'} } {/if}

{intl l='ID'} | {intl l='Feature Name'} | {intl l='Feature value for this product'} {hook name="product.features-table-header" location="product_features_table_header" }
--- | --- | ---
{loop name="product-features" type="feature" order="manual" product=$product_id backend_context="1" lang="$edit_language_id"}
{$ID} | {$TITLE} | {* Multiple values *} {ifloop rel="product-features-av"} {* load all selected values in an array to speed up things a little *} {$selected = array()} {loop name="free-text-value" exclude_free_text="true" type="feature_value" product=$product_id feature=$ID backend_context="1" lang="$edit_language_id"} {$selected[] = $FEATURE_AV_ID} {/loop} {capture name="select_options"} {loop name="product-features-av" type="feature-availability" feature=$ID order="manual" backend_context="1" lang="$edit_language_id"} {$TITLE} {$options_count = $LOOP_COUNT} {* LOOP_COUNT is only available inside the loop ! *} {/loop} {if $options_count > #maximum_product_attribute_select_size#} {$select_size = #maximum_product_attribute_select_size#} {else} {$select_size = $options_count} {/if} {/capture} {intl l='Use Ctrl+click to select more than one value. You can also clear selected values.' id={$ID}} {/ifloop} {* Free text *} {elseloop rel="product-features-av"} {* Get the free text value *} {$feature_value=''} {loop name="free-text-value" type="feature_value" product=$product_id feature=$ID backend_context="1" lang="$edit_language_id"} {if $IS_FREE_TEXT && $FREE_TEXT_VALUE != 1} {$feature_value=$FREE_TEXT_VALUE} {else} {$feature_value=$TITLE} {/if} {/loop} {/elseloop} {hook name="product.features-table-row" location="product_features_table_row" }
{/loop} {elseloop rel="product-features"}
{intl l="This product template does not contains any features"}
{/elseloop}

{include file = "includes/inner-form-toolbar.html" hide_submit_buttons = false hide_flags = true page_url = "{url path='/admin/products/update' product_id=$ID}" close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}" }
{/loop}