[+] BO : Products tab fieldset

This commit is contained in:
Jerome Nadaud
2013-08-19 13:30:18 +02:00
parent 21d5322e16
commit 4a2e545bc4
4 changed files with 576 additions and 571 deletions
@@ -22,95 +22,96 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Associations" />
<div class="Associations">
<input type="hidden" name="submitted_tabs[]" value="Associations" />
<div class="Associations">
<h3>{l s='Associations'}</h3>
<h3>{l s='Associations'}</h3>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Associations"}
<div id="no_default_category" class="alert alert-info">
{l s='Please select a default category.'}
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}
<label class="control-label col-lg-3" for="category_block">{l s='Associated categories:'}</label>
<div class="col-lg-9">
<div id="category_block">
{$category_tree}
</div>
<a class="btn btn-link bt-icon confirm_leave" href="{$link->getAdminLink('AdminCategories')|escape:'htmlall':'UTF-8'}&addcategory">
<i class="icon-plus-sign"></i> {l s='Create new category'} <i class="icon-external-link-sign"></i>
</a>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Associations"}
<div id="no_default_category" class="alert alert-info">
{l s='Please select a default category.'}
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="id_category_default" type="default"}
<label class="control-label col-lg-3" for="id_category_default">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The default category is the category displayed by default.'}">
{l s='Default category:'}
</span>
</label>
<div class="col-lg-5">
<select id="id_category_default" name="id_category_default">
{foreach from=$selected_cat item=cat}
<option value="{$cat.id_category}" {if $id_category_default == $cat.id_category}selected="selected"{/if} >{$cat.name}</option>
{/foreach}
</select>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="product_autocomplete_input">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Begin typing the first letters of the product name, then select the product from the drop-down list.'}{l s='(Do not forget to save the product afterward)'}">
{l s='Accessories:'}
</span>
</label>
<div class="col-lg-5">
<input type="hidden" name="inputAccessories" id="inputAccessories" value="{foreach from=$accessories item=accessory}{$accessory.id_product}-{/foreach}" />
<input type="hidden" name="nameAccessories" id="nameAccessories" value="{foreach from=$accessories item=accessory}{$accessory.name|escape:'htmlall':'UTF-8'}¤{/foreach}" />
<div id="ajax_choose_product">
<input type="text" value="" id="product_autocomplete_input" />
<div class="help-block">
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}
<label class="control-label col-lg-3" for="category_block">{l s='Associated categories:'}</label>
<div class="col-lg-9">
<div id="category_block">
{$category_tree}
</div>
<a class="btn btn-link bt-icon confirm_leave" href="{$link->getAdminLink('AdminCategories')|escape:'htmlall':'UTF-8'}&addcategory">
<i class="icon-plus-sign"></i> {l s='Create new category'} <i class="icon-external-link-sign"></i>
</a>
</div>
<div id="divAccessories">
{* @todo : donot use 3 foreach, but assign var *}
{foreach from=$accessories item=accessory}
{$accessory.name|escape:'htmlall':'UTF-8'}{if !empty($accessory.reference)}{$accessory.reference}{/if}
<span class="delAccessory" name="{$accessory.id_product}" style="cursor: pointer;">
<img src="../img/admin/delete.gif" class="middle" alt="" />
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="id_category_default" type="default"}
<label class="control-label col-lg-3" for="id_category_default">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The default category is the category displayed by default.'}">
{l s='Default category:'}
</span>
{/foreach}
</label>
<div class="col-lg-5">
<select id="id_category_default" name="id_category_default">
{foreach from=$selected_cat item=cat}
<option value="{$cat.id_category}" {if $id_category_default == $cat.id_category}selected="selected"{/if} >{$cat.name}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="id_manufacturer">{l s='Manufacturer:'}</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-7">
<select name="id_manufacturer" id="id_manufacturer">
<option value="0">-- {l s='Choose (optional)'} --</option>
{if $product->id_manufacturer}
<option value="{$product->id_manufacturer}" selected="selected">{$product->manufacturer_name}</option>
{/if}
<option disabled="disabled">----------</option>
</select>
<div class="row">
<label class="control-label col-lg-3" for="product_autocomplete_input">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Begin typing the first letters of the product name, then select the product from the drop-down list.'}{l s='(Do not forget to save the product afterward)'}">
{l s='Accessories:'}
</span>
</label>
<div class="col-lg-5">
<input type="hidden" name="inputAccessories" id="inputAccessories" value="{foreach from=$accessories item=accessory}{$accessory.id_product}-{/foreach}" />
<input type="hidden" name="nameAccessories" id="nameAccessories" value="{foreach from=$accessories item=accessory}{$accessory.name|escape:'htmlall':'UTF-8'}¤{/foreach}" />
<div id="ajax_choose_product">
<input type="text" value="" id="product_autocomplete_input" />
<div class="help-block">
</div>
</div>
<div class="col-lg-5">
<a class="btn btn-link bt-icon confirm_leave" style="margin-bottom:0" href="{$link->getAdminLink('AdminManufacturers')|escape:'htmlall':'UTF-8'}&addmanufacturer">
<i class="icon-plus-sign"></i> {l s='Create new manufacturer'} <i class="icon-external-link-sign"></i>
</a>
<div id="divAccessories">
{* @todo : donot use 3 foreach, but assign var *}
{foreach from=$accessories item=accessory}
{$accessory.name|escape:'htmlall':'UTF-8'}{if !empty($accessory.reference)}{$accessory.reference}{/if}
<span class="delAccessory" name="{$accessory.id_product}" style="cursor: pointer;">
<img src="../img/admin/delete.gif" class="middle" alt="" />
</span>
{/foreach}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="id_manufacturer">{l s='Manufacturer:'}</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-7">
<select name="id_manufacturer" id="id_manufacturer">
<option value="0">-- {l s='Choose (optional)'} --</option>
{if $product->id_manufacturer}
<option value="{$product->id_manufacturer}" selected="selected">{$product->manufacturer_name}</option>
{/if}
<option disabled="disabled">----------</option>
</select>
</div>
<div class="col-lg-5">
<a class="btn btn-link bt-icon confirm_leave" style="margin-bottom:0" href="{$link->getAdminLink('AdminManufacturers')|escape:'htmlall':'UTF-8'}&addmanufacturer">
<i class="icon-plus-sign"></i> {l s='Create new manufacturer'} <i class="icon-external-link-sign"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</fieldset>
@@ -22,364 +22,365 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript">
var msg_combination_1 = '{l s='Please choose an attribute.'}';
var msg_combination_2 = '{l s='Please choose a value.'}';
var msg_combination_3 = '{l s='You can only add one combination per attribute type.'}';
var msg_new_combination = '{l s='New combination'}';
var msg_cancel_combination = '{l s='Cancel combination'}';
</script>
{if isset($product->id) && !$product->is_virtual}
<input type="hidden" name="submitted_tabs[]" value="Combinations" />
<fieldset>
<script type="text/javascript">
var attrs = new Array();
var modifyattributegroup = "{l s='Modify this attribute combination.' js=1}";
attrs[0] = new Array(0, "---");
{foreach from=$attributeJs key=idgrp item=group}
attrs[{$idgrp}] = new Array(0
, '---'
{foreach from=$group key=idattr item=attrname}
, "{$idattr}", "{$attrname|addslashes}"
{/foreach}
);
{/foreach}
var msg_combination_1 = '{l s='Please choose an attribute.'}';
var msg_combination_2 = '{l s='Please choose a value.'}';
var msg_combination_3 = '{l s='You can only add one combination per attribute type.'}';
var msg_new_combination = '{l s='New combination'}';
var msg_cancel_combination = '{l s='Cancel combination'}';
</script>
<h3>{l s='Add or modify combinations for this product.'}</h3>
<div class="alert alert-info">
{l s='Or use the'}&nbsp;<a class="btn btn-link bt-icon confirm_leave" href="index.php?tab=AdminAttributeGenerator&id_product={$product->id}&attributegenerator&token={$token_generator}"><i class="icon-magic"></i> {l s='Product combinations generator'} <i class="icon-external-link-sign"></i></a> {l s='in order to automatically create a set of combinations.'}
</div>
{if $combination_exists}
<div class="alert alert-info" style="display:block">
{l s='Some combinations already exist. If you want to generate new combinations, the quantities for the existing combinations will be lost.'}<br/>
{l s='You can add a combination by clicking the link "Add new combination" on the toolbar.'}
</div>
{/if}
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
<br />
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Combinations"}
{/if}
<div id="add_new_combination" class="panel" style="display: none;">
<div class="panel-heading">{l s='Add or modify combinations for this product.'}</div>
<div class="row">
<label class="control-label col-lg-3" for="attribute_group">{l s='Attribute:'}</label>
<div class="col-lg-5">
<select name="attribute_group" id="attribute_group" onchange="populate_attrs();">
{if isset($attributes_groups)}
{foreach from=$attributes_groups key=k item=attribute_group}
<option value="{$attribute_group.id_attribute_group}">{$attribute_group.name|escape:'htmlall':'UTF-8'}&nbsp;&nbsp;</option>
{if isset($product->id) && !$product->is_virtual}
<input type="hidden" name="submitted_tabs[]" value="Combinations" />
<script type="text/javascript">
var attrs = new Array();
var modifyattributegroup = "{l s='Modify this attribute combination.' js=1}";
attrs[0] = new Array(0, "---");
{foreach from=$attributeJs key=idgrp item=group}
attrs[{$idgrp}] = new Array(0
, '---'
{foreach from=$group key=idattr item=attrname}
, "{$idattr}", "{$attrname|addslashes}"
{/foreach}
{/if}
</select>
);
{/foreach}
</script>
<h3>{l s='Add or modify combinations for this product.'}</h3>
<div class="alert alert-info">
{l s='Or use the'}&nbsp;<a class="btn btn-link bt-icon confirm_leave" href="index.php?tab=AdminAttributeGenerator&id_product={$product->id}&attributegenerator&token={$token_generator}"><i class="icon-magic"></i> {l s='Product combinations generator'} <i class="icon-external-link-sign"></i></a> {l s='in order to automatically create a set of combinations.'}
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attribute">{l s='Value:'}</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-8">
<select name="attribute" id="attribute">
<option value="0">---</option>
</select>
</div>
<div class="col-lg-4">
<button type="button" class="btn btn-default btn-block" onclick="add_attr();"><i class="icon-plus-sign-alt"></i> {l s='Add'}</button>
</div>
</div>
<div class="row">
<div class="col-lg-8">
<select id="product_att_list" name="attribute_combination_list[]" multiple="multiple" ></select>
</div>
<div class="col-lg-4">
<button type="button" class="btn btn-default btn-block" onclick="del_attr()"><i class="icon-minus-sign-alt"></i> {l s='Delete'}</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
populate_attrs();
});
</script>
<hr/>
<div class="row">
<label class="control-label col-lg-3" for="attribute_reference">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Special characters allowed:'} .-_#">
{l s='Reference:'}
</span>
</label>
<div class="col-lg-5">
<input type="text" id="attribute_reference" name="attribute_reference" value="" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attribute_ean13">
{l s='EAN13:'}
</label>
<div class="col-lg-3">
<input maxlength="13" type="text" id="attribute_ean13" name="attribute_ean13" value="" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attribute_upc">
{l s='UPC:'}
</label>
<div class="col-lg-3">
<input maxlength="12" type="text" id="attribute_upc" name="attribute_upc" value="" />
</div>
</div>
<hr/>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_wholesale_price" type="default"}
<label class="control-label col-lg-3" for="attribute_wholesale_price">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Leave blank if the price does not change'}">
{l s='Wholesale price:'}
</span>
</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0}{$currency->sign}{/if}
</span>
<input type="text" name="attribute_wholesale_price" id="attribute_wholesale_price" value="" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
<span style="display:none;" id="attribute_wholesale_price_full">({l s='Overrides wholesale price on "Information" tab'})</span>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_price_impact" type="attribute_price_impact"}
<label class="control-label col-lg-3" for="attribute_price_impact">
{l s='Impact on price:'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-4">
<select name="attribute_price_impact" id="attribute_price_impact" onchange="check_impact(); calcImpactPriceTI();">
<option value="0">{l s='None'}</option>
<option value="1">{l s='Increase'}</option>
<option value="-1">{l s='Reduction'}</option>
</select>
</div>
<div id="span_impact" class="col-lg-8">
<div class="row">
<label class="control-label col-lg-1" for="attribute_price">
{l s='of'}
</label>
<div class="input-group col-lg-5">
<div class="input-group-addon">
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0} {$currency->sign}{/if}
{if $country_display_tax_label}
{l s='(tax excl.)'}
{/if}
</div>
<input type="hidden" id="attribute_priceTEReal" name="attribute_price" value="0.00" />
<input type="text" id="attribute_price" value="0.00" onkeyup="$('#attribute_priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); calcImpactPriceTI();"/>
</div>
<label class="control-label col-lg-1" for="attribute_priceTI">
{l s='or'}
</label>
<div class="input-group col-lg-5">
<div class="input-group-addon" {if $tax_exclude_option}style="display:none"{/if}>
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0} {$currency->sign}{/if}
{l s='(tax incl.)'}
</div>
<input type="text" name="attribute_priceTI" id="attribute_priceTI" value="0.00" onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); calcImpactPriceTE();"/>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="alert">
{l s='final product price will be set to'}
{if $currency->format % 2 != 0}{$currency->sign}{/if}
<span id="attribute_new_total_price">0.00</span>
{if $currency->format % 2 == 0}{$currency->sign}{/if}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{if $combination_exists}
<div class="alert alert-info" style="display:block">
{l s='Some combinations already exist. If you want to generate new combinations, the quantities for the existing combinations will be lost.'}<br/>
{l s='You can add a combination by clicking the link "Add new combination" on the toolbar.'}
</div>
{/if}
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
<br />
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Combinations"}
{/if}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_weight_impact" type="attribute_weight_impact"}
<label class="control-label col-lg-3" for="attribute_weight_impact">
{l s='Impact on weight:'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-4">
<select name="attribute_weight_impact" id="attribute_weight_impact" onchange="check_weight_impact();">
<option value="0">{l s='None'}</option>
<option value="1">{l s='Increase'}</option>
<option value="-1">{l s='Reduction'}</option>
</select>
<div id="add_new_combination" class="panel" style="display: none;">
<div class="panel-heading">{l s='Add or modify combinations for this product.'}</div>
<div class="row">
<label class="control-label col-lg-3" for="attribute_group">{l s='Attribute:'}</label>
<div class="col-lg-5">
<select name="attribute_group" id="attribute_group" onchange="populate_attrs();">
{if isset($attributes_groups)}
{foreach from=$attributes_groups key=k item=attribute_group}
<option value="{$attribute_group.id_attribute_group}">{$attribute_group.name|escape:'htmlall':'UTF-8'}&nbsp;&nbsp;</option>
{/foreach}
{/if}
</select>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attribute">{l s='Value:'}</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-8">
<select name="attribute" id="attribute">
<option value="0">---</option>
</select>
</div>
<div class="col-lg-4">
<button type="button" class="btn btn-default btn-block" onclick="add_attr();"><i class="icon-plus-sign-alt"></i> {l s='Add'}</button>
</div>
</div>
<div id="span_weight_impact" class="col-lg-8">
<div class="row">
<label class="control-label col-lg-1" for="attribute_weight">
{l s='of'}
</label>
<div class="input-group col-lg-5">
<div class="input-group-addon">
{$ps_weight_unit}
</div>
<input type="text" name="attribute_weight" id="attribute_weight" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
<div class="row">
<div class="col-lg-8">
<select id="product_att_list" name="attribute_combination_list[]" multiple="multiple" ></select>
</div>
<div class="col-lg-4">
<button type="button" class="btn btn-default btn-block" onclick="del_attr()"><i class="icon-minus-sign-alt"></i> {l s='Delete'}</button>
</div>
</div>
</div>
</div>
</div>
<div id="tr_unit_impact" class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_unit_impact" type="attribute_unit_impact"}
<label class="control-label col-lg-3" for="attribute_unit_impact">{l s='Impact on unit price :'}</label>
<div class="col-lg-3">
<select name="attribute_unit_impact" id="attribute_unit_impact" onchange="check_unit_impact();">
<option value="0">{l s='None'}</option>
<option value="1">{l s='Increase'}</option>
<option value="-1">{l s='Reduction'}</option>
</select>
</div>
<div class="col-lg-6">
<div class="row">
<label class="control-label col-lg-1" for="attribute_unity">
{l s='of'}
</label>
<div class="input-group col-lg-5">
<div class="input-group-addon">
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0}{$currency->sign}{/if}
/ <span id="unity_third">{$field_value_unity}</span>
</div>
<input type="text" name="attribute_unity" id="attribute_unity" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
</div>
</div>
{if $ps_use_ecotax}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_ecotax" type="default"}
<label class="control-label col-lg-3" for="attribute_ecotax">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='overrides Eco-tax in the "Information" tab'}">
{l s='Eco-tax (tax excl.):'}
</span>
</label>
<div class="input-group col-lg-2">
<div class="input-group-addon">
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0} {$currency->sign}{/if}
</div>
<input type="text" name="attribute_ecotax" id="attribute_ecotax" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
{/if}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_minimal_quantity" type="default"}
<label class="control-label col-lg-3" for="attribute_minimal_quantity">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}">
{l s='Minimum quantity:'}
</span>
</label>
<div class="input-group col-lg-2">
<div class="input-group-addon">&times;</div>
<input maxlength="6" name="attribute_minimal_quantity" id="attribute_minimal_quantity" type="text" value="{$minimal_quantity}" />
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="available_date_attribute" type="default"}
<label class="control-label col-lg-3" for="available_date_attribute">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The available date when this product is out of stock.'}">
{l s='Available date:'}
</span>
</label>
<div class="input-group col-lg-3">
<input class="datepicker" id="available_date_attribute" name="available_date_attribute" value="{$available_date}" type="text" />
<div class="input-group-addon">
<i class="icon-calendar-empty"></i>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(".datepicker").datepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd'
});
populate_attrs();
});
</script>
</div>
<hr/>
<div class="row">
<label class="control-label col-lg-3">{l s='Image:'}</label>
<div class="col-lg-9">
<ul id="id_image_attr" class="list-inline">
{foreach from=$images key=k item=image}
<li>
<input type="checkbox" name="id_image_attr[]" value="{$image.id_image}" id="id_image_attr_{$image.id_image}" />
<label for="id_image_attr_{$image.id_image}">
<img src="{$smarty.const._THEME_PROD_DIR_}{$image.obj->getExistingImgPath()}-small_default.jpg" alt="{$image.legend|escape:'htmlall':'UTF-8'}" title="{$image.legend|escape:'htmlall':'UTF-8'}" />
</label>
</li>
{/foreach}
</ul>
</div>
</div>
<hr/>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_default" type="attribute_default"}
<label class="control-label col-lg-3" for="attribute_default">{l s='Default:'}</label>
<div class="col-lg-9">
<p class="checkbox">
<label for="attribute_default">
<input type="checkbox" name="attribute_default" id="attribute_default" value="1" />
{l s='Make this combination the default combination for this product'}
<div class="row">
<label class="control-label col-lg-3" for="attribute_reference">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Special characters allowed:'} .-_#">
{l s='Reference:'}
</span>
</label>
</p>
<div class="col-lg-5">
<input type="text" id="attribute_reference" name="attribute_reference" value="" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attribute_ean13">
{l s='EAN13:'}
</label>
<div class="col-lg-3">
<input maxlength="13" type="text" id="attribute_ean13" name="attribute_ean13" value="" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attribute_upc">
{l s='UPC:'}
</label>
<div class="col-lg-3">
<input maxlength="12" type="text" id="attribute_upc" name="attribute_upc" value="" />
</div>
</div>
<hr/>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_wholesale_price" type="default"}
<label class="control-label col-lg-3" for="attribute_wholesale_price">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Leave blank if the price does not change'}">
{l s='Wholesale price:'}
</span>
</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0}{$currency->sign}{/if}
</span>
<input type="text" name="attribute_wholesale_price" id="attribute_wholesale_price" value="" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
<span style="display:none;" id="attribute_wholesale_price_full">({l s='Overrides wholesale price on "Information" tab'})</span>
</div>
</div>
<div class="panel-footer">
<span id="ResetSpan">
<button type="reset" name="ResetBtn" id="ResetBtn" onclick="$('#desc-product-newCombination').click();" class="btn btn-default">
<i class="icon-undo"></i> {l s='Cancel modification'}
</button>
</span>
</div>
</div>
{$list}
{/if}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_price_impact" type="attribute_price_impact"}
<label class="control-label col-lg-3" for="attribute_price_impact">
{l s='Impact on price:'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-4">
<select name="attribute_price_impact" id="attribute_price_impact" onchange="check_impact(); calcImpactPriceTI();">
<option value="0">{l s='None'}</option>
<option value="1">{l s='Increase'}</option>
<option value="-1">{l s='Reduction'}</option>
</select>
</div>
<div id="span_impact" class="col-lg-8">
<div class="row">
<label class="control-label col-lg-1" for="attribute_price">
{l s='of'}
</label>
<div class="input-group col-lg-5">
<div class="input-group-addon">
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0} {$currency->sign}{/if}
{if $country_display_tax_label}
{l s='(tax excl.)'}
{/if}
</div>
<input type="hidden" id="attribute_priceTEReal" name="attribute_price" value="0.00" />
<input type="text" id="attribute_price" value="0.00" onkeyup="$('#attribute_priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); calcImpactPriceTI();"/>
</div>
<label class="control-label col-lg-1" for="attribute_priceTI">
{l s='or'}
</label>
<div class="input-group col-lg-5">
<div class="input-group-addon" {if $tax_exclude_option}style="display:none"{/if}>
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0} {$currency->sign}{/if}
{l s='(tax incl.)'}
</div>
<input type="text" name="attribute_priceTI" id="attribute_priceTI" value="0.00" onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); calcImpactPriceTE();"/>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="alert">
{l s='final product price will be set to'}
{if $currency->format % 2 != 0}{$currency->sign}{/if}
<span id="attribute_new_total_price">0.00</span>
{if $currency->format % 2 == 0}{$currency->sign}{/if}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_weight_impact" type="attribute_weight_impact"}
<label class="control-label col-lg-3" for="attribute_weight_impact">
{l s='Impact on weight:'}
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-4">
<select name="attribute_weight_impact" id="attribute_weight_impact" onchange="check_weight_impact();">
<option value="0">{l s='None'}</option>
<option value="1">{l s='Increase'}</option>
<option value="-1">{l s='Reduction'}</option>
</select>
</div>
<div id="span_weight_impact" class="col-lg-8">
<div class="row">
<label class="control-label col-lg-1" for="attribute_weight">
{l s='of'}
</label>
<div class="input-group col-lg-5">
<div class="input-group-addon">
{$ps_weight_unit}
</div>
<input type="text" name="attribute_weight" id="attribute_weight" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
</div>
</div>
</div>
</div>
<div id="tr_unit_impact" class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_unit_impact" type="attribute_unit_impact"}
<label class="control-label col-lg-3" for="attribute_unit_impact">{l s='Impact on unit price :'}</label>
<div class="col-lg-3">
<select name="attribute_unit_impact" id="attribute_unit_impact" onchange="check_unit_impact();">
<option value="0">{l s='None'}</option>
<option value="1">{l s='Increase'}</option>
<option value="-1">{l s='Reduction'}</option>
</select>
</div>
<div class="col-lg-6">
<div class="row">
<label class="control-label col-lg-1" for="attribute_unity">
{l s='of'}
</label>
<div class="input-group col-lg-5">
<div class="input-group-addon">
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0}{$currency->sign}{/if}
/ <span id="unity_third">{$field_value_unity}</span>
</div>
<input type="text" name="attribute_unity" id="attribute_unity" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
</div>
</div>
{if $ps_use_ecotax}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_ecotax" type="default"}
<label class="control-label col-lg-3" for="attribute_ecotax">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='overrides Eco-tax in the "Information" tab'}">
{l s='Eco-tax (tax excl.):'}
</span>
</label>
<div class="input-group col-lg-2">
<div class="input-group-addon">
{if $currency->format % 2 != 0}{$currency->sign}{/if}
{if $currency->format % 2 == 0} {$currency->sign}{/if}
</div>
<input type="text" name="attribute_ecotax" id="attribute_ecotax" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
{/if}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_minimal_quantity" type="default"}
<label class="control-label col-lg-3" for="attribute_minimal_quantity">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}">
{l s='Minimum quantity:'}
</span>
</label>
<div class="input-group col-lg-2">
<div class="input-group-addon">&times;</div>
<input maxlength="6" name="attribute_minimal_quantity" id="attribute_minimal_quantity" type="text" value="{$minimal_quantity}" />
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="available_date_attribute" type="default"}
<label class="control-label col-lg-3" for="available_date_attribute">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The available date when this product is out of stock.'}">
{l s='Available date:'}
</span>
</label>
<div class="input-group col-lg-3">
<input class="datepicker" id="available_date_attribute" name="available_date_attribute" value="{$available_date}" type="text" />
<div class="input-group-addon">
<i class="icon-calendar-empty"></i>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(".datepicker").datepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd'
});
});
</script>
</div>
<hr/>
<div class="row">
<label class="control-label col-lg-3">{l s='Image:'}</label>
<div class="col-lg-9">
<ul id="id_image_attr" class="list-inline">
{foreach from=$images key=k item=image}
<li>
<input type="checkbox" name="id_image_attr[]" value="{$image.id_image}" id="id_image_attr_{$image.id_image}" />
<label for="id_image_attr_{$image.id_image}">
<img src="{$smarty.const._THEME_PROD_DIR_}{$image.obj->getExistingImgPath()}-small_default.jpg" alt="{$image.legend|escape:'htmlall':'UTF-8'}" title="{$image.legend|escape:'htmlall':'UTF-8'}" />
</label>
</li>
{/foreach}
</ul>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_default" type="attribute_default"}
<label class="control-label col-lg-3" for="attribute_default">{l s='Default:'}</label>
<div class="col-lg-9">
<p class="checkbox">
<label for="attribute_default">
<input type="checkbox" name="attribute_default" id="attribute_default" value="1" />
{l s='Make this combination the default combination for this product'}
</label>
</p>
</div>
</div>
<div class="panel-footer">
<span id="ResetSpan">
<button type="reset" name="ResetBtn" id="ResetBtn" onclick="$('#desc-product-newCombination').click();" class="btn btn-default">
<i class="icon-undo"></i> {l s='Cancel modification'}
</button>
</span>
</div>
</div>
{$list}
{/if}
</fieldset>
@@ -22,96 +22,98 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<input type="hidden" name="submitted_tabs[]" value="Seo" />
<h3>{l s='SEO'}</h3>
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Seo" />
<h3>{l s='SEO'}</h3>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Seo"}
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Seo"}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"}
<label class="control-label col-lg-3" for="meta_title_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Product page title: Leave blank to use the product name'}">
{l s='Meta title:'}
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_name='meta_title'
input_value=$product->meta_title}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_description" type="default" multilang="true"}
<label class="control-label col-lg-3" for="meta_description_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='A single sentence for the HTML header is needed. '}">
{l s='Meta description:'}
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_name='meta_description'
input_value=$product->meta_description
}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_keywords" type="default" multilang="true"}
<label class="control-label col-lg-3" for="meta_keywords_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Keywords for HTML header, separated by commas.'}">
{l s='Meta keywords:'}
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl" languages=$languages
input_value=$product->meta_keywords
input_name='meta_keywords'}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="link_rewrite" type="default" multilang="true"}
<label class="control-label col-lg-3" for="link_rewrite_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='friendly URL from the product name.'}">
{l s='Friendly URL:'}
</span>
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-9">
<div class="row">
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"}
<label class="control-label col-lg-3" for="meta_title_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Product page title: Leave blank to use the product name'}">
{l s='Meta title:'}
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->link_rewrite
input_name='link_rewrite'}
input_name='meta_title'
input_value=$product->meta_title}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_description" type="default" multilang="true"}
<label class="control-label col-lg-3" for="meta_description_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='A single sentence for the HTML header is needed. '}">
{l s='Meta description:'}
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_name='meta_description'
input_value=$product->meta_description
}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_keywords" type="default" multilang="true"}
<label class="control-label col-lg-3" for="meta_keywords_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Keywords for HTML header, separated by commas.'}">
{l s='Meta keywords:'}
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl" languages=$languages
input_value=$product->meta_keywords
input_name='meta_keywords'}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="link_rewrite" type="default" multilang="true"}
<label class="control-label col-lg-3" for="link_rewrite_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='friendly URL from the product name.'}">
{l s='Friendly URL:'}
</span>
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-9">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->link_rewrite
input_name='link_rewrite'}
</div>
</div>
<div class="col-lg-2">
<a class="btn btn-default" onmousedown="updateFriendlyURLByName();"><i class="icon-random"></i> {l s='Generate'}</a>
</div>
</div>
<div class="col-lg-2">
<a class="btn btn-default" onmousedown="updateFriendlyURLByName();"><i class="icon-random"></i> {l s='Generate'}</a>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="alert alert-block">
<i class="icon-link"></i> {l s='The product link will look like this:'}
{$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="alert alert-block">
<i class="icon-link"></i> {l s='The product link will look like this:'}
{$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html
</div>
</div>
</div>
</fieldset>
@@ -22,90 +22,91 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Shipping" />
<h3>{l s='Shipping'}</h3>
<input type="hidden" name="submitted_tabs[]" value="Shipping" />
<h3>{l s='Shipping'}</h3>
{if isset($display_common_field) && $display_common_field}
<div class="alert alert-info">{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}</div>
{/if}
{if isset($display_common_field) && $display_common_field}
<div class="alert alert-info">{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}</div>
{/if}
<div class="row">
<label class="control-label col-lg-5" for="width">{l s='Width (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="width" name="width" type="text" value="{$product->width}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
<div class="row">
<label class="control-label col-lg-5" for="width">{l s='Width (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="width" name="width" type="text" value="{$product->width}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="height">{l s='Height (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="height" name="height" type="text" value="{$product->height}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
<div class="row">
<label class="control-label col-lg-5" for="height">{l s='Height (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="height" name="height" type="text" value="{$product->height}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="depth">{l s='Depth (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="depth" name="depth" type="text" value="{$product->depth}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
<div class="row">
<label class="control-label col-lg-5" for="depth">{l s='Depth (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="depth" name="depth" type="text" value="{$product->depth}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="weight">{l s='Weight (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_weight_unit}</span>
<input maxlength="6" id="weight" name="weight" type="text" value="{$product->weight}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
<div class="row">
<label class="control-label col-lg-5" for="weight">{l s='Weight (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_weight_unit}</span>
<input maxlength="6" id="weight" name="weight" type="text" value="{$product->weight}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="additional_shipping_cost">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='A carrier tax will be applied.'}">
{l s='Additional shipping cost (per quantity):'}
</span>
</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix} {if $country_display_tax_label}({l s='tax excl.'}){/if}</span>
<input type="text" id="additional_shipping_cost" name="additional_shipping_cost" onchange="this.value = this.value.replace(/,/g, '.');" value="{$product->additional_shipping_cost|htmlentities}" />
<div class="row">
<label class="control-label col-lg-5" for="additional_shipping_cost">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='A carrier tax will be applied.'}">
{l s='Additional shipping cost (per quantity):'}
</span>
</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix} {if $country_display_tax_label}({l s='tax excl.'}){/if}</span>
<input type="text" id="additional_shipping_cost" name="additional_shipping_cost" onchange="this.value = this.value.replace(/,/g, '.');" value="{$product->additional_shipping_cost|htmlentities}" />
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="availableCarriers">{l s='Carriers:'}</label>
<div class="input-group col-lg-7">
<div class="row">
<div class="col-lg-6">
<label for="availableCarriers">{l s='Available carriers'}</label>
<select multiple id="availableCarriers" name="availableCarriers">
{foreach $carrier_list as $carrier}
{if !isset($carrier.selected) || !$carrier.selected}
<option value="{$carrier.id_reference}">{$carrier.name}</option>
{/if}
{/foreach}
</select>
<a href="#" id="addCarrier" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
</div>
<div class="col-lg-6">
<label for="selectedCarriers">{l s='Selected carriers'}</label>
<select multiple id="selectedCarriers" name="selectedCarriers[]">
{foreach $carrier_list as $carrier}
{if isset($carrier.selected) && $carrier.selected}
<option value="{$carrier.id_reference}">{$carrier.name}</option>
{/if}
{/foreach}
</select>
<a href="#" id="removeCarrier" class="btn btn-default btn-block"><i class="icon-arrow-left"></i> {l s='Remove'}</a>
<div class="row">
<label class="control-label col-lg-5" for="availableCarriers">{l s='Carriers:'}</label>
<div class="input-group col-lg-7">
<div class="row">
<div class="col-lg-6">
<label for="availableCarriers">{l s='Available carriers'}</label>
<select multiple id="availableCarriers" name="availableCarriers">
{foreach $carrier_list as $carrier}
{if !isset($carrier.selected) || !$carrier.selected}
<option value="{$carrier.id_reference}">{$carrier.name}</option>
{/if}
{/foreach}
</select>
<a href="#" id="addCarrier" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
</div>
<div class="col-lg-6">
<label for="selectedCarriers">{l s='Selected carriers'}</label>
<select multiple id="selectedCarriers" name="selectedCarriers[]">
{foreach $carrier_list as $carrier}
{if isset($carrier.selected) && $carrier.selected}
<option value="{$carrier.id_reference}">{$carrier.name}</option>
{/if}
{/foreach}
</select>
<a href="#" id="removeCarrier" class="btn btn-default btn-block"><i class="icon-arrow-left"></i> {l s='Remove'}</a>
</div>
</div>
</div>
</div>
</div>
</fieldset>