Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Kevin Granger
2013-08-20 16:40:14 +02:00
35 changed files with 1772 additions and 1718 deletions
@@ -22,95 +22,96 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * 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" /> <h3>{l s='Associations'}</h3>
<div class="Associations">
<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">
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Associations"} {l s='Please select a default category.'}
<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>
</div> </div>
</div>
<div class="row"> <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="id_category_default" type="default"} {include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}
<label class="control-label col-lg-3" for="id_category_default"> <label class="control-label col-lg-3" for="category_block">{l s='Associated categories:'}</label>
<span class="label-tooltip" data-toggle="tooltip" <div class="col-lg-9">
title="{l s='The default category is the category displayed by default.'}"> <div id="category_block">
{l s='Default category:'} {$category_tree}
</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> </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>
<div id="divAccessories"> </div>
{* @todo : donot use 3 foreach, but assign var *}
{foreach from=$accessories item=accessory} <div class="row">
{$accessory.name|escape:'htmlall':'UTF-8'}{if !empty($accessory.reference)}{$accessory.reference}{/if} {include file="controllers/products/multishop/checkbox.tpl" field="id_category_default" type="default"}
<span class="delAccessory" name="{$accessory.id_product}" style="cursor: pointer;"> <label class="control-label col-lg-3" for="id_category_default">
<img src="../img/admin/delete.gif" class="middle" alt="" /> <span class="label-tooltip" data-toggle="tooltip"
title="{l s='The default category is the category displayed by default.'}">
{l s='Default category:'}
</span> </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>
</div>
<div class="row"> <div class="row">
<label class="control-label col-lg-3" for="id_manufacturer">{l s='Manufacturer:'}</label> <label class="control-label col-lg-3" for="product_autocomplete_input">
<div class="col-lg-9"> <span class="label-tooltip" data-toggle="tooltip"
<div class="row"> 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)'}">
<div class="col-lg-7"> {l s='Accessories:'}
<select name="id_manufacturer" id="id_manufacturer"> </span>
<option value="0">-- {l s='Choose (optional)'} --</option> </label>
{if $product->id_manufacturer} <div class="col-lg-5">
<option value="{$product->id_manufacturer}" selected="selected">{$product->manufacturer_name}</option> <input type="hidden" name="inputAccessories" id="inputAccessories" value="{foreach from=$accessories item=accessory}{$accessory.id_product}-{/foreach}" />
{/if} <input type="hidden" name="nameAccessories" id="nameAccessories" value="{foreach from=$accessories item=accessory}{$accessory.name|escape:'htmlall':'UTF-8'}¤{/foreach}" />
<option disabled="disabled">----------</option>
</select> <div id="ajax_choose_product">
<input type="text" value="" id="product_autocomplete_input" />
<div class="help-block">
</div>
</div> </div>
<div class="col-lg-5"> <div id="divAccessories">
<a class="btn btn-link bt-icon confirm_leave" style="margin-bottom:0" href="{$link->getAdminLink('AdminManufacturers')|escape:'htmlall':'UTF-8'}&addmanufacturer"> {* @todo : donot use 3 foreach, but assign var *}
<i class="icon-plus-sign"></i> {l s='Create new manufacturer'} <i class="icon-external-link-sign"></i> {foreach from=$accessories item=accessory}
</a> {$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> </div>
</div> </div>
</div> </fieldset>
@@ -24,113 +24,115 @@
*} *}
{if isset($obj->id)} {if isset($obj->id)}
<input type="hidden" name="submitted_tabs[]" value="Attachments" /> <fieldset>
<h3>{l s='Attachment'}</h3> <input type="hidden" name="submitted_tabs[]" value="Attachments" />
<h3>{l s='Attachment'}</h3>
<div class="row"> <div class="row">
<label class="control-label col-lg-3 required" for="attachment_name_{$id_lang}"> <label class="control-label col-lg-3 required" for="attachment_name_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Maximum 32 characters.'}"> title="{l s='Maximum 32 characters.'}">
{l s='Filename:'} {l s='Filename:'}
</span> </span>
</label> </label>
<div class="col-lg-7"> <div class="col-lg-7">
<div class="row"> <div class="row">
{include file="controllers/products/input_text_lang.tpl" {include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$attachment_name
input_name="attachment_name"
}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attachment_description_{$id_lang}">{l s='Description:'} </label>
<div class="col-lg-9">
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages languages=$languages
input_value=$attachment_name input_name="attachment_description"
input_name="attachment_name" input_value=$attachment_description
} }
</div> </div>
</div> </div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attachment_description_{$id_lang}">{l s='Description:'} </label>
<div class="col-lg-9">
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages
input_name="attachment_description"
input_value=$attachment_description
}
</div>
</div>
<div class="row"> <div class="row">
<label class="control-label col-lg-3" for="attachement_filename"> <label class="control-label col-lg-3" for="attachement_filename">
<span class="label-tooltip" data-toggle="tooltip" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Upload a file from your computer'} ({$PS_ATTACHMENT_MAXIMUM_SIZE|string_format:'%.2f'} {l s='MB max.'})"> title="{l s='Upload a file from your computer'} ({$PS_ATTACHMENT_MAXIMUM_SIZE|string_format:'%.2f'} {l s='MB max.'})">
{l s='File:'} {l s='File:'}
</span> </span>
</label> </label>
<div class="col-lg-7"> <div class="col-lg-7">
<div class="row"> <div class="row">
<div class="col-lg-8"> <div class="col-lg-8">
<input id="attachement_file" type="file" name="attachment_file" class="hide" /> <input id="attachement_file" type="file" name="attachment_file" class="hide" />
<div class="dummyfile input-group"> <div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span> <span class="input-group-addon"><i class="icon-file"></i></span>
<input id="attachement_filename" type="text" class="disabled" name="filename" readonly /> <input id="attachement_filename" type="text" class="disabled" name="filename" readonly />
<span class="input-group-btn"> <span class="input-group-btn">
<button id="attachement_fileselectbutton" type="button" name="submitAddAttachments" class="btn btn-default"> <button id="attachement_fileselectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {l s='Choose a file'} <i class="icon-folder-open"></i> {l s='Choose a file'}
</button> </button>
</span> </span>
</div>
</div>
<div class="col-lg-4">
<button type="submit" name="submitAddAttachments" class="btn btn-default">
<i class="icon-cloud-upload"></i> {l s='Upload attachment file'}
</button>
</div> </div>
</div> </div>
<div class="col-lg-4"> </div>
<button type="submit" name="submitAddAttachments" class="btn btn-default"> <script>
<i class="icon-cloud-upload"></i> {l s='Upload attachment file'} $(document).ready(function(){
</button> $('#attachement_fileselectbutton').click(function(e){
$('#attachement_file').trigger('click');
});
$('#attachement_file').change(function(e){
var val = $(this).val();
var file = val.split(/[\\/]/);
$('#attachement_filename').val(file[file.length-1]);
});
});
</script>
</div>
<hr/>
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="row">
<div class="col-lg-6">
<p>{l s='Available attachments:'}</p>
<select multiple id="selectAttachment2">
{foreach $attach2 as $attach}
<option value="{$attach.id_attachment}">{$attach.name}</option>
{/foreach}
</select>
<a href="#" id="addAttachment" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
</div>
<div class="col-lg-6">
<p>{l s='Attachments for this product:'}</p>
<select multiple id="selectAttachment1" name="attachments[]">
{foreach $attach1 as $attach}
<option value="{$attach.id_attachment}">{$attach.name}</option>
{/foreach}
</select>
<a href="#" id="removeAttachment" class="btn btn-default btn-block"><i class="icon-arrow-left"></i> {l s='Remove'}</a>
</div>
</div> </div>
</div> </div>
</div> </div>
<script>
$(document).ready(function(){ <input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
$('#attachement_fileselectbutton').click(function(e){
$('#attachement_file').trigger('click'); <script type="text/javascript">
}); var iso = '{$iso_tiny_mce}';
$('#attachement_file').change(function(e){ var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
var val = $(this).val(); var ad = '{$ad}';
var file = val.split(/[\\/]/);
$('#attachement_filename').val(file[file.length-1]);
});
});
</script> </script>
</div> </fieldset>
<hr/>
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="row">
<div class="col-lg-6">
<p>{l s='Available attachments:'}</p>
<select multiple id="selectAttachment2">
{foreach $attach2 as $attach}
<option value="{$attach.id_attachment}">{$attach.name}</option>
{/foreach}
</select>
<a href="#" id="addAttachment" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
</div>
<div class="col-lg-6">
<p>{l s='Attachments for this product:'}</p>
<select multiple id="selectAttachment1" name="attachments[]">
{foreach $attach1 as $attach}
<option value="{$attach.id_attachment}">{$attach.name}</option>
{/foreach}
</select>
<a href="#" id="removeAttachment" class="btn btn-default btn-block"><i class="icon-arrow-left"></i> {l s='Remove'}</a>
</div>
</div>
</div>
</div>
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
<script type="text/javascript">
var iso = '{$iso_tiny_mce}';
var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
var ad = '{$ad}';
</script>
{/if} {/if}
@@ -22,364 +22,365 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<fieldset>
<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" />
<script type="text/javascript"> <script type="text/javascript">
var attrs = new Array(); var msg_combination_1 = '{l s='Please choose an attribute.'}';
var modifyattributegroup = "{l s='Modify this attribute combination.' js=1}"; var msg_combination_2 = '{l s='Please choose a value.'}';
attrs[0] = new Array(0, "---"); var msg_combination_3 = '{l s='You can only add one combination per attribute type.'}';
{foreach from=$attributeJs key=idgrp item=group} var msg_new_combination = '{l s='New combination'}';
attrs[{$idgrp}] = new Array(0 var msg_cancel_combination = '{l s='Cancel combination'}';
, '---'
{foreach from=$group key=idattr item=attrname}
, "{$idattr}", "{$attrname|addslashes}"
{/foreach}
);
{/foreach}
</script> </script>
<h3>{l s='Add or modify combinations for this product.'}</h3> {if isset($product->id) && !$product->is_virtual}
<div class="alert alert-info"> <input type="hidden" name="submitted_tabs[]" value="Combinations" />
{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.'} <script type="text/javascript">
</div> var attrs = new Array();
var modifyattributegroup = "{l s='Modify this attribute combination.' js=1}";
{if $combination_exists} attrs[0] = new Array(0, "---");
<div class="alert alert-info" style="display:block"> {foreach from=$attributeJs key=idgrp item=group}
{l s='Some combinations already exist. If you want to generate new combinations, the quantities for the existing combinations will be lost.'}<br/> attrs[{$idgrp}] = new Array(0
{l s='You can add a combination by clicking the link "Add new combination" on the toolbar.'} , '---'
</div> {foreach from=$group key=idattr item=attrname}
{/if} , "{$idattr}", "{$attrname|addslashes}"
{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>
{/foreach} {/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>
<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"} <div id="add_new_combination" class="panel" style="display: none;">
<label class="control-label col-lg-3" for="attribute_weight_impact">
{l s='Impact on weight:'} <div class="panel-heading">{l s='Add or modify combinations for this product.'}</div>
</label>
<div class="col-lg-9"> <div class="row">
<div class="row"> <label class="control-label col-lg-3" for="attribute_group">{l s='Attribute:'}</label>
<div class="col-lg-4"> <div class="col-lg-5">
<select name="attribute_weight_impact" id="attribute_weight_impact" onchange="check_weight_impact();"> <select name="attribute_group" id="attribute_group" onchange="populate_attrs();">
<option value="0">{l s='None'}</option> {if isset($attributes_groups)}
<option value="1">{l s='Increase'}</option> {foreach from=$attributes_groups key=k item=attribute_group}
<option value="-1">{l s='Reduction'}</option> <option value="{$attribute_group.id_attribute_group}">{$attribute_group.name|escape:'htmlall':'UTF-8'}&nbsp;&nbsp;</option>
</select> {/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>
<div id="span_weight_impact" class="col-lg-8"> <div class="row">
<div class="row"> <div class="col-lg-8">
<label class="control-label col-lg-1" for="attribute_weight"> <select id="product_att_list" name="attribute_combination_list[]" multiple="multiple" ></select>
{l s='of'} </div>
</label> <div class="col-lg-4">
<div class="input-group col-lg-5"> <button type="button" class="btn btn-default btn-block" onclick="del_attr()"><i class="icon-minus-sign-alt"></i> {l s='Delete'}</button>
<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>
</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"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
$(".datepicker").datepicker({ populate_attrs();
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd'
});
}); });
</script> </script>
</div>
<hr/>
<div class="row"> <hr/>
<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"> <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_reference">
<label class="control-label col-lg-3" for="attribute_default">{l s='Default:'}</label> <span class="label-tooltip" data-toggle="tooltip"
<div class="col-lg-9"> title="{l s='Special characters allowed:'} .-_#">
<p class="checkbox"> {l s='Reference:'}
<label for="attribute_default"> </span>
<input type="checkbox" name="attribute_default" id="attribute_default" value="1" />
{l s='Make this combination the default combination for this product'}
</label> </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>
<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>
@@ -24,36 +24,37 @@
*} *}
{if isset($obj->id)} {if isset($obj->id)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Customization" /> <input type="hidden" name="submitted_tabs[]" value="Customization" />
<h3>{l s='Add or modify customizable properties.'}</h3> <h3>{l s='Add or modify customizable properties.'}</h3>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"} {include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"}
<div class="row"> <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"} {include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
<label class="control-label col-lg-3" for="uploadable_files"> <label class="control-label col-lg-3" for="uploadable_files">
<span class="label-tooltip" data-toggle="tooltip" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of upload file fields displayed'}"> title="{l s='Number of upload file fields displayed'}">
{l s='File fields:'} {l s='File fields:'}
</span> </span>
</label> </label>
<div class="col-lg-1"> <div class="col-lg-1">
<input type="text" name="uploadable_files" id="uploadable_files" value="{$uploadable_files|htmlentities}" /> <input type="text" name="uploadable_files" id="uploadable_files" value="{$uploadable_files|htmlentities}" />
</div>
</div> </div>
</div>
<div class="row"> <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"} {include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
<label class="control-label col-lg-3" for="text_fields"> <label class="control-label col-lg-3" for="text_fields">
<span class="label-tooltip" data-toggle="tooltip" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of text fields displayed'}"> title="{l s='Number of text fields displayed'}">
{l s='Text fields:'} {l s='Text fields:'}
</span> </span>
</label> </label>
<div class="col-lg-1"> <div class="col-lg-1">
<input type="text" name="text_fields" id="text_fields" value="{$text_fields|htmlentities}" /> <input type="text" name="text_fields" id="text_fields" value="{$text_fields|htmlentities}" />
</div>
</div> </div>
</div>
{if $has_file_labels} {if $has_file_labels}
{l s='Define the label of the file fields:'} {l s='Define the label of the file fields:'}
@@ -64,5 +65,5 @@
{l s='Define the label of the text fields:'} {l s='Define the label of the text fields:'}
{$display_text_labels} {$display_text_labels}
{/if} {/if}
</fieldset>
{/if} {/if}
@@ -24,6 +24,7 @@
*} *}
{if isset($product->id)} {if isset($product->id)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Features" /> <input type="hidden" name="submitted_tabs[]" value="Features" />
<h3>{l s='Assign features to this product:'}</h3> <h3>{l s='Assign features to this product:'}</h3>
@@ -107,5 +108,5 @@
<a href="{$link->getAdminLink('AdminFeatures')|escape:'htmlall':'UTF-8'}&amp;addfeature" class="btn btn-link confirm_leave button"> <a href="{$link->getAdminLink('AdminFeatures')|escape:'htmlall':'UTF-8'}&amp;addfeature" class="btn btn-link confirm_leave button">
<i class="icon-plus-sign"></i> {l s='Add a new feature'} <i class="icon-external-link-sign"></i> <i class="icon-plus-sign"></i> {l s='Add a new feature'} <i class="icon-external-link-sign"></i>
</a> </a>
</fieldset>
{/if} {/if}
@@ -251,11 +251,11 @@
{* all input are here *} {* all input are here *}
<div class="row"> <div class="row">
{foreach $product_tabs key=numStep item=tab} {foreach $product_tabs key=numStep item=tab}
<fieldset id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content" {if !$tab.selected}style="display:none"{/if}> <div id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content" {if !$tab.selected}style="display:none"{/if}>
{if $tab.selected} {if $tab.selected}
{$custom_form} {$custom_form}
{/if} {/if}
</fieldset> </div>
{/foreach} {/foreach}
</div> </div>
@@ -24,6 +24,7 @@
*} *}
{if isset($id_product) && isset($product)} {if isset($id_product) && isset($product)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Images" /> <input type="hidden" name="submitted_tabs[]" value="Images" />
<h3 class="tab" > <h3 class="tab" >
@@ -328,4 +329,5 @@
}); });
{/literal} {/literal}
</script> </script>
</fieldset>
{/if} {/if}
@@ -28,404 +28,406 @@
{assign var=class_input_ajax value=''} {assign var=class_input_ajax value=''}
{/if} {/if}
<input type="hidden" name="submitted_tabs[]" value="Informations" /> <fieldset>
<h3 class="tab">{l s='Info.'}</h3> <input type="hidden" name="submitted_tabs[]" value="Informations" />
<div class="alert alert-info">{l s='Product global information'}</div> <h3 class="tab">{l s='Info.'}</h3>
<script type="text/javascript"> <div class="alert alert-info">{l s='Product global information'}</div>
{if isset($PS_ALLOW_ACCENTED_CHARS_URL) && $PS_ALLOW_ACCENTED_CHARS_URL} <script type="text/javascript">
var PS_ALLOW_ACCENTED_CHARS_URL = 1; {if isset($PS_ALLOW_ACCENTED_CHARS_URL) && $PS_ALLOW_ACCENTED_CHARS_URL}
{else} var PS_ALLOW_ACCENTED_CHARS_URL = 1;
var PS_ALLOW_ACCENTED_CHARS_URL = 0; {else}
{/if} var PS_ALLOW_ACCENTED_CHARS_URL = 0;
{$combinationImagesJs}
{if $check_product_association_ajax}
var search_term = '';
$('document').ready( function() {
$(".check_product_name")
.autocomplete(
'{$link->getAdminLink('AdminProducts', true)|addslashes}', {
minChars: 3,
max: 10,
width: $(".check_product_name").width(),
selectFirst: false,
scroll: false,
dataType: "json",
formatItem: function(data, i, max, value, term) {
search_term = term;
// adding the little
if ($('.ac_results').find('.separation').length == 0)
$('.ac_results').css('background-color', '#EFEFEF')
.prepend('<div style="color:#585A69; padding:2px 5px">{l s='Use a product from the list'}<div class="separation"></div></div>');
return value;
},
parse: function(data) {
var mytab = new Array();
for (var i = 0; i < data.length; i++)
mytab[mytab.length] = { data: data[i], value: data[i].name };
return mytab;
},
extraParams: {
ajax: 1,
action: 'checkProductName',
id_lang: {$id_lang}
}
}
)
.result(function(event, data, formatted) {
// keep the searched term in the input
$('#name_{$id_lang}').val(search_term);
jConfirm('{l s='Do you want to use this product?'}&nbsp;<strong>'+data.name+'</strong>', '{l s='Confirmation'}', function(confirm){
if (confirm == true)
document.location.href = '{$link->getAdminLink('AdminProducts', true)}&updateproduct&id_product='+data.id_product;
else
return false;
});
});
});
{/if}
</script>
{if isset($display_common_field) && $display_common_field}
<div class="alert alert-block" style="display: block">{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}
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"}
<div id="warn_virtual_combinations" class="alert alert-block" style="display:none">{l s='You cannot use combinations with a virtual product.'}</div>
<div class="row">
<label class="control-label col-lg-3" for="simple_product">{$bullet_common_field} {l s='Type:'}</label>
<div class="col-lg-9">
<div class="radio">
<label for="simple_product">
<input type="radio" name="type_product" id="simple_product" value="{Product::PTYPE_SIMPLE}" {if $product_type == Product::PTYPE_SIMPLE}checked="checked"{/if} />
{l s='Product'}
</label>
</div>
<div class="radio">
<label for="pack_product">
<input type="radio" name="type_product" {if $is_in_pack}disabled="disabled"{/if} id="pack_product" value="{Product::PTYPE_PACK}" {if $product_type == Product::PTYPE_PACK}checked="checked"{/if} />
{l s='Pack'}
</label>
</div>
<div class="radio">
<label for="virtual_product">
<input type="radio" name="type_product" id="virtual_product" {if $is_in_pack}disabled="disabled"{/if} value="{Product::PTYPE_VIRTUAL}" {if $product_type == Product::PTYPE_VIRTUAL}checked="checked"{/if} />
{l s='Virtual Product (services, booking or downloadable products)'}
</label>
</div>
</div>
</div>
<hr/>
<div class="row">
<label class="control-label col-lg-3 required" for="name_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Invalid characters:'} &lt;&gt;;=#{}">
{l s='Name:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_class="{$class_input_ajax}{if !$product->id}copy2friendlyUrl{/if} updateCurrentText"
input_value=$product->name
input_name="name"
}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="reference">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Special characters allowed:'} .-_#\">
{$bullet_common_field} {l s='Reference:'}
</span>
</label>
<div class="col-lg-5">
<input type="text" id="reference" name="reference" value="{$product->reference|htmlentitiesUTF8}" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="ean13">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='(Europe, Japan)'}">
{$bullet_common_field} {l s='EAN13 or JAN:'}
</span>
</label>
<div class="col-lg-3">
<input maxlength="13" type="text" id="ean13" name="ean13" value="{$product->ean13|htmlentitiesUTF8}" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="upc">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='(US, Canada)'}">
{$bullet_common_field} {l s='UPC:'}
</span>
</label>
<div class="col-lg-3">
<input maxlength="12" type="text" id="upc" name="upc" value="{$product->upc|escape:html:'UTF-8'}" />
</div>
</div>
<hr/>
{* status informations *}
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<div class="row">
<label class="control-label col-lg-3">{l s='Status:'}</label>
<div class="input-group col-lg-3">
<span class="switch prestashop-switch">
<input onclick="toggleDraftWarning(false);showOptions(true);showRedirectProductOptions(false);" type="radio" name="active" id="active_on" value="1" {if $product->active || !$product->isAssociatedToShop()}checked="checked" {/if} />
<label for="active_on" class="radioCheck">
<i class="icon-check-sign"></i> {l s='Enabled'}
</label>
<input onclick="toggleDraftWarning(true);showOptions(false);showRedirectProductOptions(true);" type="radio" name="active" id="active_off" value="0" {if !$product->active && $product->isAssociatedToShop()}checked="checked"{/if} />
<label for="active_off" class="radioCheck">
<i class="icon-ban-circle"></i> {l s='Disabled'}
</label>
<span class="slide-button btn btn-default"></span>
</span>
</div>
</div>
<div class="row redirect_product_options" style="display:none">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="control-label col-lg-3" for="redirect_type">{l s='Redirect:'}</label>
<div class="col-lg-5">
<select name="redirect_type" id="redirect_type">
<option value="404" {if $product->redirect_type == '404'} selected="selected" {/if}>{l s='No redirect (404)'}</option>
<option value="301" {if $product->redirect_type == '301'} selected="selected" {/if}>{l s='Redirect permanently (301)'}</option>
<option value="302" {if $product->redirect_type == '302'} selected="selected" {/if}>{l s='Redirect temporarily (302)'}</option>
</select>
</div>
</div>
<div class="row redirect_product_options" style="display:none">
<div class="col-lg-9 col-offset-3">
<div class="alert alert-info">
{l s='404 : Not Found = Product does not exist and no redirect'}<br/>
{l s='301 : Moved Permanently = Product Moved Permanently'}<br/>
{l s='302 : Moved Temporarily = Product moved temporarily'}
</div>
</div>
</div>
<div class="row redirect_product_options redirect_product_options_product_choise" style="display:none">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="control-label col-lg-3" for="related_product_autocomplete_input">{l s='Related product:'}</label>
<div class="col-lg-7">
<input type="hidden" value="" name="id_product_redirected" />
<div class="input-group">
<input type="text" id="related_product_autocomplete_input" autocomplete="off" class="ac_input" />
<span class="input-group-addon"><i class="icon-search"></i></span>
</div>
<span id="related_product_remove" style="display:none">
<a class="btn btn-default" href="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
<i class="icon-trash"></i>
</a>
</span>
<span id="related_product_name">{l s='No related product'}</span>
</div>
<script>
var no_related_product = '{l s='No related product'}';
var id_product_redirected = {$product->id_product_redirected|intval};
var product_name_redirected = '{$product_name_redirected|escape:html:'UTF-8'}';
</script>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"}
<label class="control-label col-lg-3" for="visibility">{l s='Visibility:'}</label>
<div class="col-lg-3">
<select name="visibility" id="visibility">
<option value="both" {if $product->visibility == 'both'}selected="selected"{/if} >{l s='Everywhere'}</option>
<option value="catalog" {if $product->visibility == 'catalog'}selected="selected"{/if} >{l s='Catalog only'}</option>
<option value="search" {if $product->visibility == 'search'}selected="selected"{/if} >{l s='Search only'}</option>
<option value="none" {if $product->visibility == 'none'}selected="selected"{/if}>{l s='Nowhere'}</option>
</select>
</div>
</div>
<div id="product_options" class="row" {if !$product->active}style="display:none"{/if} >
<div class="col-lg-12">
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
<div class="row multishop_product_checkbox">
{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"}
{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"}
{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"}
</div>
{/if} {/if}
<div class="row"> {$combinationImagesJs}
<label class="control-label col-lg-3" for="available_for_order">{l s='Options:'}</label> {if $check_product_association_ajax}
<div class="col-lg-5"> var search_term = '';
<p class="checkbox"> $('document').ready( function() {
<input type="checkbox" name="available_for_order" id="available_for_order" value="1" {if $product->available_for_order}checked="checked"{/if} /> $(".check_product_name")
<label for="available_for_order" class="t">{l s='Available for order'}</label> .autocomplete(
</p> '{$link->getAdminLink('AdminProducts', true)|addslashes}', {
<p class="checkbox"> minChars: 3,
<input type="checkbox" name="show_price" id="show_price" value="1" {if $product->show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/> max: 10,
<label for="show_price" class="t">{l s='show price'}</label> width: $(".check_product_name").width(),
</p> selectFirst: false,
<p class="checkbox"> scroll: false,
<input type="checkbox" name="online_only" id="online_only" value="1" {if $product->online_only}checked="checked"{/if} /> dataType: "json",
<label for="online_only" class="t">{l s='Online only (not sold in store)'}</label> formatItem: function(data, i, max, value, term) {
</p> search_term = term;
// adding the little
if ($('.ac_results').find('.separation').length == 0)
$('.ac_results').css('background-color', '#EFEFEF')
.prepend('<div style="color:#585A69; padding:2px 5px">{l s='Use a product from the list'}<div class="separation"></div></div>');
return value;
},
parse: function(data) {
var mytab = new Array();
for (var i = 0; i < data.length; i++)
mytab[mytab.length] = { data: data[i], value: data[i].name };
return mytab;
},
extraParams: {
ajax: 1,
action: 'checkProductName',
id_lang: {$id_lang}
}
}
)
.result(function(event, data, formatted) {
// keep the searched term in the input
$('#name_{$id_lang}').val(search_term);
jConfirm('{l s='Do you want to use this product?'}&nbsp;<strong>'+data.name+'</strong>', '{l s='Confirmation'}', function(confirm){
if (confirm == true)
document.location.href = '{$link->getAdminLink('AdminProducts', true)}&updateproduct&id_product='+data.id_product;
else
return false;
});
});
});
{/if}
</script>
{if isset($display_common_field) && $display_common_field}
<div class="alert alert-block" style="display: block">{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}
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"}
<div id="warn_virtual_combinations" class="alert alert-block" style="display:none">{l s='You cannot use combinations with a virtual product.'}</div>
<div class="row">
<label class="control-label col-lg-3" for="simple_product">{$bullet_common_field} {l s='Type:'}</label>
<div class="col-lg-9">
<div class="radio">
<label for="simple_product">
<input type="radio" name="type_product" id="simple_product" value="{Product::PTYPE_SIMPLE}" {if $product_type == Product::PTYPE_SIMPLE}checked="checked"{/if} />
{l s='Product'}
</label>
</div>
<div class="radio">
<label for="pack_product">
<input type="radio" name="type_product" {if $is_in_pack}disabled="disabled"{/if} id="pack_product" value="{Product::PTYPE_PACK}" {if $product_type == Product::PTYPE_PACK}checked="checked"{/if} />
{l s='Pack'}
</label>
</div>
<div class="radio">
<label for="virtual_product">
<input type="radio" name="type_product" id="virtual_product" {if $is_in_pack}disabled="disabled"{/if} value="{Product::PTYPE_VIRTUAL}" {if $product_type == Product::PTYPE_VIRTUAL}checked="checked"{/if} />
{l s='Virtual Product (services, booking or downloadable products)'}
</label>
</div> </div>
</div> </div>
<div class="row"> </div>
{include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"}
<label class="control-label col-lg-3" for="condition">{l s='Condition:'}</label> <hr/>
<div class="col-lg-3">
<select name="condition" id="condition"> <div class="row">
<option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option> <label class="control-label col-lg-3 required" for="name_{$id_lang}">
<option value="used" {if $product->condition == 'used'}selected="selected"{/if} >{l s='Used'}</option> <span class="label-tooltip" data-toggle="tooltip"
<option value="refurbished" {if $product->condition == 'refurbished'}selected="selected"{/if}>{l s='Refurbished'}</option> title="{l s='Invalid characters:'} &lt;&gt;;=#{}">
</select> {l s='Name:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_class="{$class_input_ajax}{if !$product->id}copy2friendlyUrl{/if} updateCurrentText"
input_value=$product->name
input_name="name"
}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="reference">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Special characters allowed:'} .-_#\">
{$bullet_common_field} {l s='Reference:'}
</span>
</label>
<div class="col-lg-5">
<input type="text" id="reference" name="reference" value="{$product->reference|htmlentitiesUTF8}" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="ean13">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='(Europe, Japan)'}">
{$bullet_common_field} {l s='EAN13 or JAN:'}
</span>
</label>
<div class="col-lg-3">
<input maxlength="13" type="text" id="ean13" name="ean13" value="{$product->ean13|htmlentitiesUTF8}" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="upc">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='(US, Canada)'}">
{$bullet_common_field} {l s='UPC:'}
</span>
</label>
<div class="col-lg-3">
<input maxlength="12" type="text" id="upc" name="upc" value="{$product->upc|escape:html:'UTF-8'}" />
</div>
</div>
<hr/>
{* status informations *}
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<div class="row">
<label class="control-label col-lg-3">{l s='Status:'}</label>
<div class="input-group col-lg-3">
<span class="switch prestashop-switch">
<input onclick="toggleDraftWarning(false);showOptions(true);showRedirectProductOptions(false);" type="radio" name="active" id="active_on" value="1" {if $product->active || !$product->isAssociatedToShop()}checked="checked" {/if} />
<label for="active_on" class="radioCheck">
<i class="icon-check-sign"></i> {l s='Enabled'}
</label>
<input onclick="toggleDraftWarning(true);showOptions(false);showRedirectProductOptions(true);" type="radio" name="active" id="active_off" value="0" {if !$product->active && $product->isAssociatedToShop()}checked="checked"{/if} />
<label for="active_off" class="radioCheck">
<i class="icon-ban-circle"></i> {l s='Disabled'}
</label>
<span class="slide-button btn btn-default"></span>
</span>
</div>
</div>
<div class="row redirect_product_options" style="display:none">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="control-label col-lg-3" for="redirect_type">{l s='Redirect:'}</label>
<div class="col-lg-5">
<select name="redirect_type" id="redirect_type">
<option value="404" {if $product->redirect_type == '404'} selected="selected" {/if}>{l s='No redirect (404)'}</option>
<option value="301" {if $product->redirect_type == '301'} selected="selected" {/if}>{l s='Redirect permanently (301)'}</option>
<option value="302" {if $product->redirect_type == '302'} selected="selected" {/if}>{l s='Redirect temporarily (302)'}</option>
</select>
</div>
</div>
<div class="row redirect_product_options" style="display:none">
<div class="col-lg-9 col-offset-3">
<div class="alert alert-info">
{l s='404 : Not Found = Product does not exist and no redirect'}<br/>
{l s='301 : Moved Permanently = Product Moved Permanently'}<br/>
{l s='302 : Moved Temporarily = Product moved temporarily'}
</div> </div>
</div> </div>
</div> </div>
</div>
<hr/> <div class="row redirect_product_options redirect_product_options_product_choise" style="display:none">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="control-label col-lg-3" for="related_product_autocomplete_input">{l s='Related product:'}</label>
<div class="col-lg-7">
<input type="hidden" value="" name="id_product_redirected" />
<div class="row"> <div class="input-group">
{include file="controllers/products/multishop/checkbox.tpl" field="description_short" type="tinymce" multilang="true"} <input type="text" id="related_product_autocomplete_input" autocomplete="off" class="ac_input" />
<label class="control-label col-lg-3" for="description_short_{$id_lang}"> <span class="input-group-addon"><i class="icon-search"></i></span>
<span class="label-tooltip" data-toggle="tooltip" </div>
title="{l s='Appears in the product list(s), and on the top of the product page.'}">
{l s='Short description:'} <span id="related_product_remove" style="display:none">
</span> <a class="btn btn-default" href="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
</label> <i class="icon-trash"></i>
<div class="col-lg-9"> </a>
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages
input_name='description_short'
input_value=$product->description_short
max=$PS_PRODUCT_SHORT_DESC_LIMIT}
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="description" type="tinymce" multilang="true"}
<label class="control-label col-lg-3" for="description_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Appears in the body of the product page'}">
{l s='Description:'}
</span>
</label>
<div class="col-lg-9">
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages input_name='description'
input_value=$product->description}
</div>
</div>
{if $images}
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="alert">
{l s='Do you want an image associated with the product in your description?'}
<a class="addImageDescription" href="javascript:void(0);">{l s='Click here'}</a>.
</div>
</div>
</div>
<div id="createImageDescription" class="panel" style="display:none">
<div class="row">
<label class="control-label col-lg-3" for="smallImage_0">{l s='Select your image:'}</label>
<div class="col-lg-9">
<ul class="list-inline">
{foreach from=$images item=image key=key}
<li>
<input type="radio" name="smallImage" id="smallImage_{$key}" value="{$image.id_image}" {if $key == 0}checked="checked"{/if} >
<label for="smallImage_{$key}" class="t">
<img src="{$image.src}" alt="{$image.legend}" />
</label>
</li>
{/foreach}
</ul>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="leftRight_1">{l s='Position:'}</label>
<div class="col-lg-5">
<p class="checkbox">
<input type="radio" name="leftRight" id="leftRight_1" value="left" checked>
<label for="leftRight_1" class="t">{l s='left'}</label>
</p>
<p class="checkbox">
<input type="radio" name="leftRight" id="leftRight_2" value="right">
<label for="leftRight_2" class="t">{l s='right'}</label>
</p>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="imageTypes_0">{l s='Select the type of picture:'}</label>
<div class="col-lg-5">
{foreach from=$imagesTypes key=key item=type}
<p class="checkbox">
<input type="radio" name="imageTypes" id="imageTypes_{$key}" value="{$type.name}" {if $key == 0}checked="checked"{/if}>
<label for="imageTypes_{$key}" class="t">
{$type.name} <span>({$type.width}px {l s='by'} {$type.height}px)</span>
</label>
</p>
{/foreach}
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="resultImage">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The tag to copy/paste into the description.'}">
{l s='Image tag to insert:'}
</span> </span>
</label> <span id="related_product_name">{l s='No related product'}</span>
<div class="col-lg-4">
<input type="text" id="resultImage" name="resultImage" />
</div> </div>
<p class="help-block"></p> <script>
var no_related_product = '{l s='No related product'}';
var id_product_redirected = {$product->id_product_redirected|intval};
var product_name_redirected = '{$product_name_redirected|escape:html:'UTF-8'}';
</script>
</div> </div>
</div>
{/if}
<div class="row"> <div class="row">
<label class="control-label col-lg-3" for="tags_{$id_lang}"> {include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"}
<span class="label-tooltip" data-toggle="tooltip" <label class="control-label col-lg-3" for="visibility">{l s='Visibility:'}</label>
title="{l s='Tags separated by commas (e.g. dvd, dvd player, hifi)'} - {l s='Forbidden characters:'} !&lt;;&gt;;?=+#&quot;&deg;{}_$%"> <div class="col-lg-3">
{l s='Tags:'} <select name="visibility" id="visibility">
</span> <option value="both" {if $product->visibility == 'both'}selected="selected"{/if} >{l s='Everywhere'}</option>
</label> <option value="catalog" {if $product->visibility == 'catalog'}selected="selected"{/if} >{l s='Catalog only'}</option>
<div class="col-lg-8"> <option value="search" {if $product->visibility == 'search'}selected="selected"{/if} >{l s='Search only'}</option>
<div class="row"> <option value="none" {if $product->visibility == 'none'}selected="selected"{/if}>{l s='Nowhere'}</option>
{foreach from=$languages item=language} </select>
<div class="input-group col-lg-12 translatable-field lang-{$language.id_lang}" style="display: table;"> </div>
<input type="text" id="tags_{$language.id_lang}" class=" updateCurrentText" name="tags_{$language.id_lang}" value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}"> </div>
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <div id="product_options" class="row" {if !$product->active}style="display:none"{/if} >
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.iso_code} <div class="col-lg-12">
<span class="caret"></span> {if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
</button> <div class="row multishop_product_checkbox">
<ul class="dropdown-menu"> {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"}
{foreach from=$languages item=language} {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"}
<li> {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"}
<a href="javascript:hideOtherLanguage({$language.id_lang});"> </div>
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.iso_code} {/if}
</a> <div class="row">
</li> <label class="control-label col-lg-3" for="available_for_order">{l s='Options:'}</label>
{/foreach} <div class="col-lg-5">
</ul> <p class="checkbox">
<input type="checkbox" name="available_for_order" id="available_for_order" value="1" {if $product->available_for_order}checked="checked"{/if} />
<label for="available_for_order" class="t">{l s='Available for order'}</label>
</p>
<p class="checkbox">
<input type="checkbox" name="show_price" id="show_price" value="1" {if $product->show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/>
<label for="show_price" class="t">{l s='show price'}</label>
</p>
<p class="checkbox">
<input type="checkbox" name="online_only" id="online_only" value="1" {if $product->online_only}checked="checked"{/if} />
<label for="online_only" class="t">{l s='Online only (not sold in store)'}</label>
</p>
</div> </div>
</div> </div>
{/foreach} <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"}
<label class="control-label col-lg-3" for="condition">{l s='Condition:'}</label>
<div class="col-lg-3">
<select name="condition" id="condition">
<option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option>
<option value="used" {if $product->condition == 'used'}selected="selected"{/if} >{l s='Used'}</option>
<option value="refurbished" {if $product->condition == 'refurbished'}selected="selected"{/if}>{l s='Refurbished'}</option>
</select>
</div>
</div>
</div> </div>
</div> </div>
</div>
<hr/>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="description_short" type="tinymce" multilang="true"}
<label class="control-label col-lg-3" for="description_short_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Appears in the product list(s), and on the top of the product page.'}">
{l s='Short description:'}
</span>
</label>
<div class="col-lg-9">
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages
input_name='description_short'
input_value=$product->description_short
max=$PS_PRODUCT_SHORT_DESC_LIMIT}
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="description" type="tinymce" multilang="true"}
<label class="control-label col-lg-3" for="description_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Appears in the body of the product page'}">
{l s='Description:'}
</span>
</label>
<div class="col-lg-9">
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages input_name='description'
input_value=$product->description}
</div>
</div>
{if $images}
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="alert">
{l s='Do you want an image associated with the product in your description?'}
<a class="addImageDescription" href="javascript:void(0);">{l s='Click here'}</a>.
</div>
</div>
</div>
<div id="createImageDescription" class="panel" style="display:none">
<div class="row">
<label class="control-label col-lg-3" for="smallImage_0">{l s='Select your image:'}</label>
<div class="col-lg-9">
<ul class="list-inline">
{foreach from=$images item=image key=key}
<li>
<input type="radio" name="smallImage" id="smallImage_{$key}" value="{$image.id_image}" {if $key == 0}checked="checked"{/if} >
<label for="smallImage_{$key}" class="t">
<img src="{$image.src}" alt="{$image.legend}" />
</label>
</li>
{/foreach}
</ul>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="leftRight_1">{l s='Position:'}</label>
<div class="col-lg-5">
<p class="checkbox">
<input type="radio" name="leftRight" id="leftRight_1" value="left" checked>
<label for="leftRight_1" class="t">{l s='left'}</label>
</p>
<p class="checkbox">
<input type="radio" name="leftRight" id="leftRight_2" value="right">
<label for="leftRight_2" class="t">{l s='right'}</label>
</p>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="imageTypes_0">{l s='Select the type of picture:'}</label>
<div class="col-lg-5">
{foreach from=$imagesTypes key=key item=type}
<p class="checkbox">
<input type="radio" name="imageTypes" id="imageTypes_{$key}" value="{$type.name}" {if $key == 0}checked="checked"{/if}>
<label for="imageTypes_{$key}" class="t">
{$type.name} <span>({$type.width}px {l s='by'} {$type.height}px)</span>
</label>
</p>
{/foreach}
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="resultImage">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The tag to copy/paste into the description.'}">
{l s='Image tag to insert:'}
</span>
</label>
<div class="col-lg-4">
<input type="text" id="resultImage" name="resultImage" />
</div>
<p class="help-block"></p>
</div>
</div>
{/if}
<div class="row">
<label class="control-label col-lg-3" for="tags_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Tags separated by commas (e.g. dvd, dvd player, hifi)'} - {l s='Forbidden characters:'} !&lt;;&gt;;?=+#&quot;&deg;{}_$%">
{l s='Tags:'}
</span>
</label>
<div class="col-lg-8">
<div class="row">
{foreach from=$languages item=language}
<div class="input-group col-lg-12 translatable-field lang-{$language.id_lang}" style="display: table;">
<input type="text" id="tags_{$language.id_lang}" class=" updateCurrentText" name="tags_{$language.id_lang}" value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.iso_code}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li>
<a href="javascript:hideOtherLanguage({$language.id_lang});">
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.iso_code}
</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/foreach}
</div>
</div>
</div>
</fieldset>
@@ -30,7 +30,7 @@
{if isset($input_class)}class="{$input_class}"{/if} {if isset($input_class)}class="{$input_class}"{/if}
name="{$input_name}_{$language.id_lang}" name="{$input_name}_{$language.id_lang}"
value="{$input_value[$language.id_lang]|htmlentitiesUTF8|default:''}" value="{$input_value[$language.id_lang]|htmlentitiesUTF8|default:''}"
onkeyup="if (isArrowKey(event)) return ;updateFriendlyURL();"> onkeyup="if (isArrowKey(event)) return ;updateFriendlyURL();" onblur="updateLinkRewrite();">
<div class="input-group-btn"> <div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> <img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt="">
@@ -103,397 +103,396 @@ $(document).ready(function () {
Customer.init(); Customer.init();
}); });
</script> </script>
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Prices" />
<h3>{l s='Product price'}</h3>
<input type="hidden" name="submitted_tabs[]" value="Prices" /> <div class="alert alert-info">
<h3>{l s='Product price'}</h3> {l s='You must enter either the pre-tax retail price, or the retail price with tax. The input field will be automatically calculated.'}
<div class="alert alert-info">
{l s='You must enter either the pre-tax retail price, or the retail price with tax. The input field will be automatically calculated.'}
</div>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Prices"}
{include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"}
<div class="row">
<label class="control-label col-lg-3" for="wholesale_price">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Wholesale price'}">
{l s='Pre-tax wholesale price:'}
</span>
</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{{toolsConvertPrice price=$product->wholesale_price}|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />
</div> </div>
</div>
<div class="row"> {include file="controllers/products/multishop/check_fields.tpl" product_tab="Prices"}
{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}
<label class="control-label col-lg-3" for="priceTE"> {include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"}
<span class="label-tooltip" data-toggle="tooltip" <div class="row">
title="{l s='The pre-tax retail price to sell this product'}"> <label class="control-label col-lg-3" for="wholesale_price">
{l s='Pre-tax retail price:'} <span class="label-tooltip" data-toggle="tooltip"
</span> title="{l s='Wholesale price'}">
</label> {l s='Pre-tax wholesale price:'}
<div class="input-group col-lg-2"> </span>
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input type="hidden" id="priceTEReal" name="price" value="{toolsConvertPrice price=$product->price}" /> </label>
<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{{toolsConvertPrice price=$product->price}|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" /> <div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{{toolsConvertPrice price=$product->wholesale_price}|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />
</div>
</div> </div>
</div>
<div class="row"> <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"} {include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}
<label class="control-label col-lg-3" for="id_tax_rules_group">{l s='Tax rule:'}</label> <label class="control-label col-lg-3" for="priceTE">
<div class="col-lg-8"> <span class="label-tooltip" data-toggle="tooltip"
<script type="text/javascript"> title="{l s='The pre-tax retail price to sell this product'}">
noTax = {if $tax_exclude_taxe_option}true{else}false{/if}; {l s='Pre-tax retail price:'}
taxesArray = new Array (); </span>
taxesArray[0] = 0; </label>
{foreach $tax_rules_groups as $tax_rules_group} <div class="input-group col-lg-2">
{if isset($taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']])} <span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
taxesArray[{$tax_rules_group.id_tax_rules_group}] = {$taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']]}; <input type="hidden" id="priceTEReal" name="price" value="{toolsConvertPrice price=$product->price}" />
{else} <input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{{toolsConvertPrice price=$product->price}|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" />
taxesArray[{$tax_rules_group.id_tax_rules_group}] = 0; </div>
{/if} </div>
{/foreach}
ecotaxTaxRate = {$ecotaxTaxRate / 100}; <div class="row">
</script> {include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"}
<div class="row"> <label class="control-label col-lg-3" for="id_tax_rules_group">{l s='Tax rule:'}</label>
<div class="col-lg-6"> <div class="col-lg-8">
<select onChange="javascript:calcPrice(); unitPriceWithTax('unit');" name="id_tax_rules_group" id="id_tax_rules_group" {if $tax_exclude_taxe_option}disabled="disabled"{/if} > <script type="text/javascript">
<option value="0">{l s='No Tax'}</option> noTax = {if $tax_exclude_taxe_option}true{else}false{/if};
{foreach from=$tax_rules_groups item=tax_rules_group} taxesArray = new Array ();
<option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} > taxesArray[0] = 0;
{$tax_rules_group['name']|htmlentitiesUTF8} {foreach $tax_rules_groups as $tax_rules_group}
</option> {if isset($taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']])}
taxesArray[{$tax_rules_group.id_tax_rules_group}] = {$taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']]};
{else}
taxesArray[{$tax_rules_group.id_tax_rules_group}] = 0;
{/if}
{/foreach} {/foreach}
</select> ecotaxTaxRate = {$ecotaxTaxRate / 100};
</div> </script>
<div class="col-lg-2"> <div class="row">
<a class="btn btn-link confirm_leave" href="{$link->getAdminLink('AdminTaxRulesGroup')|escape:'htmlall':'UTF-8'}&addtax_rules_group&id_product={$product->id}" {if $tax_exclude_taxe_option}disabled="disabled"{/if}> <div class="col-lg-6">
<i class="icon-plus-sign"></i> {l s='Create new taxe'} <i class="icon-external-link-sign"></i> <select onChange="javascript:calcPrice(); unitPriceWithTax('unit');" name="id_tax_rules_group" id="id_tax_rules_group" {if $tax_exclude_taxe_option}disabled="disabled"{/if} >
</a> <option value="0">{l s='No Tax'}</option>
{foreach from=$tax_rules_groups item=tax_rules_group}
<option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >
{$tax_rules_group['name']|htmlentitiesUTF8}
</option>
{/foreach}
</select>
</div>
<div class="col-lg-2">
<a class="btn btn-link confirm_leave" href="{$link->getAdminLink('AdminTaxRulesGroup')|escape:'htmlall':'UTF-8'}&addtax_rules_group&id_product={$product->id}" {if $tax_exclude_taxe_option}disabled="disabled"{/if}>
<i class="icon-plus-sign"></i> {l s='Create new taxe'} <i class="icon-external-link-sign"></i>
</a>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
{if $tax_exclude_taxe_option} {if $tax_exclude_taxe_option}
<div class="row"> <div class="row">
<div class="col-lg-9 col-offset-3"> <div class="col-lg-9 col-offset-3">
<div class="alert"> <div class="alert">
{l s='Taxes are currently disabled'} : {l s='Taxes are currently disabled'} :
<a href="{$link->getAdminLink('AdminTaxes')|escape:'htmlall':'UTF-8'}">{l s='Tax options'}</a> <a href="{$link->getAdminLink('AdminTaxes')|escape:'htmlall':'UTF-8'}">{l s='Tax options'}</a>
<input type="hidden" value="{$product->getIdTaxRulesGroup()}" name="id_tax_rules_group" /> <input type="hidden" value="{$product->getIdTaxRulesGroup()}" name="id_tax_rules_group" />
</div>
</div> </div>
</div> </div>
</div> {/if}
{/if}
<div class="row" {if !$ps_use_ecotax} style="display:none;"{/if}> <div class="row" {if !$ps_use_ecotax} style="display:none;"{/if}>
{include file="controllers/products/multishop/checkbox.tpl" field="ecot" type="default"} {include file="controllers/products/multishop/checkbox.tpl" field="ecot" type="default"}
<label class="control-label col-lg-3" for="ecotax"> <label class="control-label col-lg-3" for="ecotax">
<span class="label-tooltip" data-toggle="tooltip" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='already included in price'}"> title="{l s='already included in price'}">
{l s='Eco-tax (tax incl.):'} {l s='Eco-tax (tax incl.):'}
</span>
</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input maxlength="14" id="ecotax" name="ecotax" type="text" value="{$product->ecotax|string_format:'%.2f'}" onkeyup="$('#priceType').val('TI');if (isArrowKey(event))return; calcPriceTE(); this.value = this.value.replace(/,/g, '.'); if (parseInt(this.value) > getE('priceTE').value) this.value = getE('priceTE').value; if (isNaN(this.value)) this.value = 0;" />
</div>
</div>
<div class="row" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none;"{/if} >
<label class="control-label col-lg-3" for="priceTI">{l s='Retail price with tax:'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input id="priceType" name="priceType" type="hidden" value="TE" />
<input maxlength="14" id="priceTI" type="text" value="" onchange="noComma('priceTI');" onkeyup="$('#priceType').val('TI');if (isArrowKey(event)) return; calcPriceTE();" />
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"}
<label class="control-label col-lg-3" for="unit_price">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='e.g. per lb.'}">
{l s='Unit price:'}
</span>
</label>
<div class="input-group col-lg-4">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input maxlength="14" id="unit_price" name="unit_price" type="text" value="{$unit_price|string_format:'%.2f'}" onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); unitPriceWithTax('unit');"/>
<span class="input-group-addon">{l s='per'}</span>
<input maxlength="10" id="unity" name="unity" type="text" value="{$product->unity|htmlentitiesUTF8}" onkeyup="if (isArrowKey(event)) return ;unitySecond();" onchange="unitySecond();"/>
</div>
</div>
{if $ps_tax && $country_display_tax_label}
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="alert">
<span>{l s='or'}
{$currency->prefix}<span id="unit_price_with_tax">0.00</span>{$currency->suffix}
{l s='per'} <span id="unity_second">{$product->unity}</span> {l s='with tax'}
</span> </span>
</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input maxlength="14" id="ecotax" name="ecotax" type="text" value="{$product->ecotax|string_format:'%.2f'}" onkeyup="$('#priceType').val('TI');if (isArrowKey(event))return; calcPriceTE(); this.value = this.value.replace(/,/g, '.'); if (parseInt(this.value) > getE('priceTE').value) this.value = getE('priceTE').value; if (isNaN(this.value)) this.value = 0;" />
</div> </div>
</div> </div>
</div>
{/if}
<div class="row"> <div class="row" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none;"{/if} >
{include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"} <label class="control-label col-lg-3" for="priceTI">{l s='Retail price with tax:'}</label>
<div class="col-lg-9 col-offset-3"> <div class="input-group col-lg-2">
<div class="checkbox"> <span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<label class="control-label" for="on_sale" > <input id="priceType" name="priceType" type="hidden" value="TE" />
<input type="checkbox" name="on_sale" id="on_sale" {if $product->on_sale}checked="checked"{/if} value="1" /> <input maxlength="14" id="priceTI" type="text" value="" onchange="noComma('priceTI');" onkeyup="$('#priceType').val('TI');if (isArrowKey(event)) return; calcPriceTE();" />
{l s='Display the "on sale" icon on the product page, and in the text found within the product listing.'}
</label>
</div> </div>
</div> </div>
</div>
<div class="row"> <div class="row">
<div class="col-lg-9 col-offset-3"> {include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"}
<div class="alert"> <label class="control-label col-lg-3" for="unit_price">
<strong>{l s='Final retail price:'}</strong> <span class="label-tooltip" data-toggle="tooltip"
<span {if !$country_display_tax_label}style="display:none"{/if} > title="{l s='e.g. per lb.'}">
{$currency->prefix} {l s='Unit price:'}
<span id="finalPrice" >0.00</span>
{$currency->suffix}
<span {if $ps_tax}style="display:none;"{/if}> ({l s='tax incl.'})</span>
</span>
<span {if $ps_tax}style="display:none;"{/if} >
{if $country_display_tax_label}
/
{/if}
{$currency->prefix}
<span id="finalPriceWithoutTax"></span>
{$currency->suffix}
{if $country_display_tax_label}({l s='tax excl.'}){/if}
</span> </span>
</label>
<div class="input-group col-lg-4">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input maxlength="14" id="unit_price" name="unit_price" type="text" value="{$unit_price|string_format:'%.2f'}" onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); unitPriceWithTax('unit');"/>
<span class="input-group-addon">{l s='per'}</span>
<input maxlength="10" id="unity" name="unity" type="text" value="{$product->unity|htmlentitiesUTF8}" onkeyup="if (isArrowKey(event)) return ;unitySecond();" onchange="unitySecond();"/>
</div> </div>
</div> </div>
</div>
{if $ps_tax && $country_display_tax_label}
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="alert">
<span>{l s='or'}
{$currency->prefix}<span id="unit_price_with_tax">0.00</span>{$currency->suffix}
{l s='per'} <span id="unity_second">{$product->unity}</span> {l s='with tax'}
</span>
</div>
</div>
</div>
{/if}
{*todo separate fieldset*} <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"}
<div class="col-lg-9 col-offset-3">
<div class="checkbox">
<label class="control-label" for="on_sale" >
<input type="checkbox" name="on_sale" id="on_sale" {if $product->on_sale}checked="checked"{/if} value="1" />
{l s='Display the "on sale" icon on the product page, and in the text found within the product listing.'}
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="alert">
<strong>{l s='Final retail price:'}</strong>
<span {if !$country_display_tax_label}style="display:none"{/if} >
{$currency->prefix}
<span id="finalPrice" >0.00</span>
{$currency->suffix}
<span {if $ps_tax}style="display:none;"{/if}> ({l s='tax incl.'})</span>
</span>
<span {if $ps_tax}style="display:none;"{/if} >
{if $country_display_tax_label}
/
{/if}
{$currency->prefix}
<span id="finalPriceWithoutTax"></span>
{$currency->suffix}
{if $country_display_tax_label}({l s='tax excl.'}){/if}
</span>
</div>
</div>
</div>
</fieldset>
{if isset($specificPriceModificationForm)} {if isset($specificPriceModificationForm)}
<h3>{l s='Specific prices'}</h3> <fieldset>
<h3>{l s='Specific prices'}</h3>
<div class="alert alert-info"> <div class="alert alert-info">
{l s='You can set specific prices for clients belonging to different groups, different countries, etc...'} {l s='You can set specific prices for clients belonging to different groups, different countries, etc...'}
</div>
<div class="row">
<div class="col-lg-12">
<a class="btn btn-default" href="#" id="show_specific_price">
<i class="icon-plus-sign"></i> {l s='Add a new specific price'}
</a>
<a class="btn btn-default" href="#" id="hide_specific_price" style="display:none">
<i class="icon-remove"></i> {l s='Cancel new specific price'}
</a>
</div> </div>
</div>
<script type="text/javascript"> <div class="row">
var product_prices = new Array(); <div class="col-lg-12">
{foreach from=$combinations item='combination'} <a class="btn btn-default" href="#" id="show_specific_price">
product_prices['{$combination.id_product_attribute}'] = '{$combination.price}'; <i class="icon-plus-sign"></i> {l s='Add a new specific price'}
{/foreach} </a>
</script> <a class="btn btn-default" href="#" id="hide_specific_price" style="display:none">
<i class="icon-remove"></i> {l s='Cancel new specific price'}
</a>
</div>
</div>
<div id="add_specific_price" class="well" style="display: none;"> <script type="text/javascript">
<div class="col-lg-12"> var product_prices = new Array();
{foreach from=$combinations item='combination'}
product_prices['{$combination.id_product_attribute}'] = '{$combination.price}';
{/foreach}
</script>
<div class="row"> <div id="add_specific_price" class="well" style="display: none;">
<label class="control-label col-lg-3" for="{if !$multi_shop}spm_currency_0{else}sp_id_shop{/if}">{l s='For:'}</label> <div class="col-lg-12">
<div class="col-lg-9">
<div class="row"> <div class="row">
{if !$multi_shop} <label class="control-label col-lg-3" for="{if !$multi_shop}spm_currency_0{else}sp_id_shop{/if}">{l s='For:'}</label>
<input type="hidden" name="sp_id_shop" value="0" /> <div class="col-lg-9">
{else} <div class="row">
<div class="col-lg-3"> {if !$multi_shop}
<select name="sp_id_shop" id="sp_id_shop"> <input type="hidden" name="sp_id_shop" value="0" />
{if !$admin_one_shop}<option value="0">{l s='All shops'}</option>{/if} {else}
{foreach from=$shops item=shop} <div class="col-lg-3">
<option value="{$shop.id_shop}">{$shop.name|htmlentitiesUTF8}</option> <select name="sp_id_shop" id="sp_id_shop">
{/foreach} {if !$admin_one_shop}<option value="0">{l s='All shops'}</option>{/if}
</select> {foreach from=$shops item=shop}
</div> <option value="{$shop.id_shop}">{$shop.name|htmlentitiesUTF8}</option>
{/if} {/foreach}
<div class="col-lg-3"> </select>
<select name="sp_id_currency" id="spm_currency_0" onchange="changeCurrencySpecificPrice(0);"> </div>
<option value="0">{l s='All currencies'}</option> {/if}
{foreach from=$currencies item=curr} <div class="col-lg-3">
<option value="{$curr.id_currency}">{$curr.name|htmlentitiesUTF8}</option> <select name="sp_id_currency" id="spm_currency_0" onchange="changeCurrencySpecificPrice(0);">
{/foreach} <option value="0">{l s='All currencies'}</option>
</select> {foreach from=$currencies item=curr}
</div> <option value="{$curr.id_currency}">{$curr.name|htmlentitiesUTF8}</option>
<div class="col-lg-3"> {/foreach}
<select name="sp_id_country" id="sp_id_country"> </select>
<option value="0">{l s='All countries'}</option> </div>
{foreach from=$countries item=country} <div class="col-lg-3">
<option value="{$country.id_country}">{$country.name|htmlentitiesUTF8}</option> <select name="sp_id_country" id="sp_id_country">
{/foreach} <option value="0">{l s='All countries'}</option>
</select> {foreach from=$countries item=country}
</div> <option value="{$country.id_country}">{$country.name|htmlentitiesUTF8}</option>
<div class="col-lg-3"> {/foreach}
<select name="sp_id_group" id="sp_id_group"> </select>
<option value="0">{l s='All groups'}</option> </div>
{foreach from=$groups item=group} <div class="col-lg-3">
<option value="{$group.id_group}">{$group.name}</option> <select name="sp_id_group" id="sp_id_group">
{/foreach} <option value="0">{l s='All groups'}</option>
</select> {foreach from=$groups item=group}
<option value="{$group.id_group}">{$group.name}</option>
{/foreach}
</select>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="row"> <div class="row">
<label class="control-label col-lg-3" for="customer">{l s='Customer:'}</label> <label class="control-label col-lg-3" for="customer">{l s='Customer:'}</label>
<div class="col-lg-9"> <div class="col-lg-9">
<input type="hidden" name="sp_id_customer" id="id_customer" value="0" /> <input type="hidden" name="sp_id_customer" id="id_customer" value="0" />
<input type="text" name="customer" value="{l s='All customers'}" id="customer" autocomplete="off" /> <input type="text" name="customer" value="{l s='All customers'}" id="customer" autocomplete="off" />
</div>
<img src="../img/admin/field-loader.gif" id="customerLoader" alt="{l s='Loading...'}" style="display: none;" />
<div id="customers"></div>
</div> </div>
<img src="../img/admin/field-loader.gif" id="customerLoader" alt="{l s='Loading...'}" style="display: none;" />
<div id="customers"></div>
</div>
{if $combinations|@count != 0} {if $combinations|@count != 0}
<div class="row"> <div class="row">
<label class="control-label col-lg-3" for="sp_id_product_attribute">{l s='Combination:'}</label> <label class="control-label col-lg-3" for="sp_id_product_attribute">{l s='Combination:'}</label>
<div class="col-lg-4"> <div class="col-lg-4">
<select id="sp_id_product_attribute" name="sp_id_product_attribute"> <select id="sp_id_product_attribute" name="sp_id_product_attribute">
<option value="0">{l s='Apply to all combinations'}</option> <option value="0">{l s='Apply to all combinations'}</option>
{foreach from=$combinations item='combination'} {foreach from=$combinations item='combination'}
<option value="{$combination.id_product_attribute}">{$combination.attributes}</option> <option value="{$combination.id_product_attribute}">{$combination.attributes}</option>
{/foreach} {/foreach}
</select> </select>
</div>
</div> </div>
</div> {/if}
{/if}
<div class="row"> <div class="row">
<label class="control-label col-lg-3" for="sp_from">{l s='Available from:'}</label> <label class="control-label col-lg-3" for="sp_from">{l s='Available from:'}</label>
<div class="input-group col-lg-4"> <div class="input-group col-lg-4">
<input class="datepicker" type="text" name="sp_from" value="" style="text-align: center" id="sp_from" /> <input class="datepicker" type="text" name="sp_from" value="" style="text-align: center" id="sp_from" />
<span class="input-group-addon">{l s='to'}</span> <span class="input-group-addon">{l s='to'}</span>
<input class="datepicker" type="text" name="sp_to" value="" style="text-align: center" id="sp_to" /> <input class="datepicker" type="text" name="sp_to" value="" style="text-align: center" id="sp_to" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="sp_from_quantity">{l s='Starting at'}</label>
<div class="input-group col-lg-4">
<span class="input-group-addon">{l s='unit'}</span>
<input type="text" name="sp_from_quantity" id="sp_from_quantity" value="1" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="sp_price">{l s='Product price'}
{if $country_display_tax_label}
{l s='(tax excl.):'}
{/if}
</label>
<div class="col-lg-9">
<div class="row">
<div class="input-group col-lg-4">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input type="text" disabled="disabled" name="sp_price" id="sp_price" value="{$product->price|string_format:'%.2f'}" />
</div>
<div class="col-lg-8">
<p class="checkbox">
<label for="leave_bprice">{l s='Leave base price:'}</label>
<input id="leave_bprice" type="checkbox" value="1" checked="checked" name="leave_bprice" />
</p>
</div>
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="sp_reduction">{l s='Apply a discount of:'}</label>
<div class="col-lg-4">
<div class="row">
<div class="col-lg-6">
<input type="text" name="sp_reduction" id="sp_reduction" value="0.00"/>
</div>
<div class="col-lg-6">
<select name="sp_reduction_type" id="sp_reduction_type">
<option selected="selected">---</option>
<option value="amount">{l s='Amount'}</option>
<option value="percentage">{l s='Percentage'}</option>
</select>
</div>
</div>
</div>
<p class="help-block">{l s='The discount is applied after the tax'}</p>
</div> </div>
</div>
<div class="row"> </div>
<label class="control-label col-lg-3" for="sp_from_quantity">{l s='Starting at'}</label> </div>
<div class="input-group col-lg-4"> <script type="text/javascript">
<span class="input-group-addon">{l s='unit'}</span> $(document).ready(function(){
<input type="text" name="sp_from_quantity" id="sp_from_quantity" value="1" /> product_prices['0'] = $('#sp_current_ht_price').html();
</div> $('#id_product_attribute').change(function() {
</div> $('#sp_current_ht_price').html(product_prices[$('#id_product_attribute option:selected').val()]);
});
<div class="row"> $('#leave_bprice').click(function() {
<label class="control-label col-lg-3" for="sp_price">{l s='Product price'} if (this.checked)
{if $country_display_tax_label} $('#sp_price').attr('disabled', 'disabled');
{l s='(tax excl.):'} else
{/if} $('#sp_price').removeAttr('disabled');
</label> });
<div class="col-lg-9"> $('.datepicker').datetimepicker({
<div class="row"> prevText: '',
<div class="input-group col-lg-4"> nextText: '',
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span> dateFormat: 'yy-mm-dd',
<input type="text" disabled="disabled" name="sp_price" id="sp_price" value="{$product->price|string_format:'%.2f'}" /> // Define a custom regional settings in order to use PrestaShop translation tools
</div> currentText: '{l s='Now'}',
<div class="col-lg-8"> closeText: '{l s='Done'}',
<p class="checkbox"> ampm: false,
<label for="leave_bprice">{l s='Leave base price:'}</label> amNames: ['AM', 'A'],
<input id="leave_bprice" type="checkbox" value="1" checked="checked" name="leave_bprice" /> pmNames: ['PM', 'P'],
</p> timeFormat: 'hh:mm:ss tt',
</div> timeSuffix: '',
</div> timeOnlyTitle: '{l s='Choose Time'}',
</div> timeText: '{l s='Time'}',
</div> hourText: '{l s='Hour'}',
minuteText: '{l s='Minute'}',
<div class="row"> });
<label class="control-label col-lg-3" for="sp_reduction">{l s='Apply a discount of:'}</label>
<div class="col-lg-4">
<div class="row">
<div class="col-lg-6">
<input type="text" name="sp_reduction" id="sp_reduction" value="0.00"/>
</div>
<div class="col-lg-6">
<select name="sp_reduction_type" id="sp_reduction_type">
<option selected="selected">---</option>
<option value="amount">{l s='Amount'}</option>
<option value="percentage">{l s='Percentage'}</option>
</select>
</div>
</div>
</div>
<p class="help-block">{l s='The discount is applied after the tax'}</p>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
product_prices['0'] = $('#sp_current_ht_price').html();
$('#id_product_attribute').change(function() {
$('#sp_current_ht_price').html(product_prices[$('#id_product_attribute option:selected').val()]);
}); });
$('#leave_bprice').click(function() { </script>
if (this.checked)
$('#sp_price').attr('disabled', 'disabled');
else
$('#sp_price').removeAttr('disabled');
});
$('.datepicker').datetimepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd',
// Define a custom regional settings in order to use PrestaShop translation tools
currentText: '{l s='Now'}',
closeText: '{l s='Done'}',
ampm: false,
amNames: ['AM', 'A'],
pmNames: ['PM', 'P'],
timeFormat: 'hh:mm:ss tt',
timeSuffix: '',
timeOnlyTitle: '{l s='Choose Time'}',
timeText: '{l s='Time'}',
hourText: '{l s='Hour'}',
minuteText: '{l s='Minute'}',
});
});
</script>
<table id="specific_prices_list" class="table"> <table id="specific_prices_list" class="table">
<thead> <thead>
<tr> <tr>
<th class="cell border" >{l s='Rule'}</th> <th class="cell border" >{l s='Rule'}</th>
<th class="cell border" >{l s='Combination'}</th> <th class="cell border" >{l s='Combination'}</th>
{if $multi_shop}<th>{l s='Shop'}</th>{/if} {if $multi_shop}<th>{l s='Shop'}</th>{/if}
<th class="cell border">{l s='Currency'}</th> <th class="cell border">{l s='Currency'}</th>
<th class="cell border">{l s='Country'}</th> <th class="cell border">{l s='Country'}</th>
<th class="cell border">{l s='Group'}</th> <th class="cell border">{l s='Group'}</th>
<th class="cell border">{l s='Customer'}</th> <th class="cell border">{l s='Customer'}</th>
<th class="cell border">{l s='Fixed price'}</th> <th class="cell border">{l s='Fixed price'}</th>
<th class="cell border">{l s='Impact'}</th> <th class="cell border">{l s='Impact'}</th>
<th class="cell border">{l s='Period'}</th> <th class="cell border">{l s='Period'}</th>
<th class="cell border">{l s='From (quantity)'}</th> <th class="cell border">{l s='From (quantity)'}</th>
<th class="cell border">{l s='Action'}</th> <th class="cell border">{l s='Action'}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{$specificPriceModificationForm} {$specificPriceModificationForm}
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
calcPriceTI(); delete_price_rule = '{l s="Do you really want to remove this price rule?"}';
unitPriceWithTax('unit'); calcPriceTI();
}); unitPriceWithTax('unit');
</script> });
{/if} </script>
{/if}
@@ -24,215 +24,218 @@
*} *}
{if isset($product->id)} {if isset($product->id)}
<input type="hidden" name="submitted_tabs[]" value="Quantities" /> <fieldset>
<h3>{l s='Available quantities for sale'}</h3> <input type="hidden" name="submitted_tabs[]" value="Quantities" />
{if !$ps_stock_management} <h3>{l s='Available quantities for sale'}</h3>
<div class="alert alert-info">{l s='The stock management is disabled'}</div> {if !$ps_stock_management}
{else} <div class="alert alert-info">{l s='The stock management is disabled'}</div>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"}
<div class="alert alert-info">
{l s='This interface allows you to manage available quantities for sale for products. It also allows you to manage product combinations in the current shop.'}<br/>
{l s='You can choose whether or not to use the advanced stock management system for this product.'}<br/>
{l s='You can manually specify the quantities for the product/each product combination, or you can choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}<br/>
{l s='In this case, quantities correspond to the real-stock quantities in the warehouses connected with the current shop, or current group of shops.'}<br/>
{l s='For packs: If it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}<br/>
{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}
</div>
{if $show_quantities == true}
<div class="alert alert-block" id="available_quantity_ajax_msg" style="display: none;"></div>
<div class="error" id="available_quantity_ajax_error_msg" style="display: none;"></div>
<div class="alert" id="available_quantity_ajax_success_msg" style="display: none;"></div>
<div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<div class="col-lg-12">
<p class="checkbox">
<label for="advanced_stock_management">
<input type="checkbox" name="advanced_stock_management" class="advanced_stock_management" id="advanced_stock_management"
{if $product->advanced_stock_management == 1 && $stock_management_active == 1}
value="1" checked="checked"
{else}
value="0"
{/if}
{if $stock_management_active == 0 || $product->cache_is_pack}
disabled="disabled"
{/if}
/>
{l s='I want to use the advanced stock management system for this product.'}
{if $stock_management_active == 0 && !$product->cache_is_pack}&nbsp;-&nbsp;<strong>{l s='This requires you to enable advanced stock management.'}</strong>
{else if $product->cache_is_pack}&nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
</label>
</p>
</div>
</div>
<div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<label class="control-label col-lg-3" for="depends_on_stock_1">{l s='Available quantities:'}</label>
<div class="col-lg-9">
<p class="radio">
<label for="depends_on_stock_1">
<input type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"
{if $product->depends_on_stock == 1 && $stock_management_active == 1}
checked="checked"
{/if}
{if $stock_management_active == 0 || $product->advanced_stock_management == 0 || $product->cache_is_pack}
disabled="disabled"
{/if}
/>
{l s='Available quantities for current product and its combinations are based on warehouse stock. '}
{if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack} &nbsp;-&nbsp;{l s='This requires you to enable advanced stock management globally or for this product.'}
{else if $product->cache_is_pack} &nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
</label>
</p>
<p class="radio">
<label for="depends_on_stock_0" for="depends_on_stock_0">
<input type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_0" value="0"
{if $product->depends_on_stock == 0 || $stock_management_active == 0}
checked="checked"
{/if}
/>
{l s='I want to specify available quantities manually.'}
</label>
</p>
</div>
</div>
{if isset($pack_quantity)}
<div class="alert alert-info">
<p>{l s='When a product has combinations, quantities will be based on the default combination.'}</p>
<p>{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}</p>
</div>
{/if}
<table class="table">
<colgroup>
<col width="50">
<col>
</colgroup>
<thead>
<tr>
<th>{l s='Quantity'}</th>
<th>{l s='Designation'}</th>
</tr>
</thead>
{foreach from=$attributes item=attribute}
<tr>
<td class="available_quantity" id="qty_{$attribute['id_product_attribute']}">
<span>{$available_quantity[$attribute['id_product_attribute']]}</span>
<input type="text" value="{$available_quantity[$attribute['id_product_attribute']]|htmlentities}"/>
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
</tr>
{/foreach}
</table>
<div id="when_out_of_stock" class="row">
<label class="control-label col-lg-3">{l s='When out of stock:'}</label>
<div class="col-lg-9">
<p class="checkbox">
<label id="label_out_of_stock_1" for="out_of_stock_1">
<input {if $product->out_of_stock == 0} checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock">
{l s='Deny orders'}
</label>
</p>
<p class="checkbox">
<label id="label_out_of_stock_2" for="out_of_stock_2">
<input {if $product->out_of_stock == 1} checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock">
{l s='Allow orders'}
</label>
</p>
<p class="checkbox">
<label id="label_out_of_stock_3" for="out_of_stock_3">
<input {if $product->out_of_stock == 2} checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock">
{l s='Default'}:
{if $order_out_of_stock == 1}
{l s='Allow orders'}
{else}
{l s='Deny orders'}
{/if}
<a class="confirm_leave" href="index.php?tab=AdminPPreferences&token={$token_preferences}">
{l s='as set in Preferences'}
</a>
</label>
</p>
</div>
</div>
{else} {else}
<div class="alert alert-block"> {include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"}
<p>{l s='It is not possible to manage quantities when:'}</p> <div class="alert alert-info">
<ul> {l s='This interface allows you to manage available quantities for sale for products. It also allows you to manage product combinations in the current shop.'}<br/>
<li>{l s='You are currently managing all of your shops.'}</li> {l s='You can choose whether or not to use the advanced stock management system for this product.'}<br/>
<li>{l s='You are currently managing a group of shops where quantities are not shared between every shop in this group.'}</li> {l s='You can manually specify the quantities for the product/each product combination, or you can choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}<br/>
<li>{l s='You are currently managing a shop that is in a group where quantities are shared between every shop in this group.'}</li> {l s='In this case, quantities correspond to the real-stock quantities in the warehouses connected with the current shop, or current group of shops.'}<br/>
</ul> {l s='For packs: If it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}<br/>
{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}
</div> </div>
{/if}
{/if}
<h3>{l s='Availability settings'}</h3> {if $show_quantities == true}
<div class="alert alert-block" id="available_quantity_ajax_msg" style="display: none;"></div>
<div class="error" id="available_quantity_ajax_error_msg" style="display: none;"></div>
<div class="alert" id="available_quantity_ajax_success_msg" style="display: none;"></div>
{if !$has_attribute}
<div class="row">
<label class="control-label col-lg-3" for="minimal_quantity">{l s='Minimum quantity:'}</label>
<div class="col-lg-1">
<input maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="{$product->minimal_quantity|default:1}" />
</div>
<p class="help-block">{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
</div>
{/if}
{if $ps_stock_management}
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
<div class="row">
<label class="control-label col-lg-5" for="available_now_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when in-stock:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->available_now
input_name='available_now'}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
<label class="control-label col-lg-5" for="available_later_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when back-ordereding is allowed:'}
</span>
</label>
<div class="col-lg-5"> <div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<div class="row"> <div class="col-lg-12">
{include file="controllers/products/input_text_lang.tpl" <p class="checkbox">
languages=$languages <label for="advanced_stock_management">
input_value=$product->available_later <input type="checkbox" name="advanced_stock_management" class="advanced_stock_management" id="advanced_stock_management"
input_name='available_later'} {if $product->advanced_stock_management == 1 && $stock_management_active == 1}
value="1" checked="checked"
{else}
value="0"
{/if}
{if $stock_management_active == 0 || $product->cache_is_pack}
disabled="disabled"
{/if}
/>
{l s='I want to use the advanced stock management system for this product.'}
{if $stock_management_active == 0 && !$product->cache_is_pack}&nbsp;-&nbsp;<strong>{l s='This requires you to enable advanced stock management.'}</strong>
{else if $product->cache_is_pack}&nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
</label>
</p>
</div>
</div>
<div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<label class="control-label col-lg-3" for="depends_on_stock_1">{l s='Available quantities:'}</label>
<div class="col-lg-9">
<p class="radio">
<label for="depends_on_stock_1">
<input type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"
{if $product->depends_on_stock == 1 && $stock_management_active == 1}
checked="checked"
{/if}
{if $stock_management_active == 0 || $product->advanced_stock_management == 0 || $product->cache_is_pack}
disabled="disabled"
{/if}
/>
{l s='Available quantities for current product and its combinations are based on warehouse stock. '}
{if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack} &nbsp;-&nbsp;{l s='This requires you to enable advanced stock management globally or for this product.'}
{else if $product->cache_is_pack} &nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
</label>
</p>
<p class="radio">
<label for="depends_on_stock_0" for="depends_on_stock_0">
<input type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_0" value="0"
{if $product->depends_on_stock == 0 || $stock_management_active == 0}
checked="checked"
{/if}
/>
{l s='I want to specify available quantities manually.'}
</label>
</p>
</div>
</div>
{if isset($pack_quantity)}
<div class="alert alert-info">
<p>{l s='When a product has combinations, quantities will be based on the default combination.'}</p>
<p>{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}</p>
</div>
{/if}
<table class="table">
<colgroup>
<col width="50">
<col>
</colgroup>
<thead>
<tr>
<th>{l s='Quantity'}</th>
<th>{l s='Designation'}</th>
</tr>
</thead>
{foreach from=$attributes item=attribute}
<tr>
<td class="available_quantity" id="qty_{$attribute['id_product_attribute']}">
<span>{$available_quantity[$attribute['id_product_attribute']]}</span>
<input type="text" value="{$available_quantity[$attribute['id_product_attribute']]|htmlentities}"/>
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
</tr>
{/foreach}
</table>
<div id="when_out_of_stock" class="row">
<label class="control-label col-lg-3">{l s='When out of stock:'}</label>
<div class="col-lg-9">
<p class="checkbox">
<label id="label_out_of_stock_1" for="out_of_stock_1">
<input {if $product->out_of_stock == 0} checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock">
{l s='Deny orders'}
</label>
</p>
<p class="checkbox">
<label id="label_out_of_stock_2" for="out_of_stock_2">
<input {if $product->out_of_stock == 1} checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock">
{l s='Allow orders'}
</label>
</p>
<p class="checkbox">
<label id="label_out_of_stock_3" for="out_of_stock_3">
<input {if $product->out_of_stock == 2} checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock">
{l s='Default'}:
{if $order_out_of_stock == 1}
{l s='Allow orders'}
{else}
{l s='Deny orders'}
{/if}
<a class="confirm_leave" href="index.php?tab=AdminPPreferences&token={$token_preferences}">
{l s='as set in Preferences'}
</a>
</label>
</p>
</div>
</div>
{else}
<div class="alert alert-block">
<p>{l s='It is not possible to manage quantities when:'}</p>
<ul>
<li>{l s='You are currently managing all of your shops.'}</li>
<li>{l s='You are currently managing a group of shops where quantities are not shared between every shop in this group.'}</li>
<li>{l s='You are currently managing a shop that is in a group where quantities are shared between every shop in this group.'}</li>
</ul>
</div>
{/if}
{/if}
</fieldset>
<fieldset>
<h3>{l s='Availability settings'}</h3>
{if !$has_attribute}
<div class="row">
<label class="control-label col-lg-3" for="minimal_quantity">{l s='Minimum quantity:'}</label>
<div class="col-lg-1">
<input maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="{$product->minimal_quantity|default:1}" />
</div>
<p class="help-block">{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
</div>
{/if}
{if $ps_stock_management}
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
<div class="row">
<label class="control-label col-lg-5" for="available_now_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when in-stock:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->available_now
input_name='available_now'}
</div>
</div> </div>
</div> </div>
</div> <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
{if !$countAttributes} <label class="control-label col-lg-5" for="available_later_{$id_lang}">
<label for="available_date">{l s='Available date:'}</label> <span class="label-tooltip" data-toggle="tooltip"
<input id="available_date" name="available_date" value="{$product->available_date}" class="datepicker" type="text" /> title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
<p>{l s='The available date when this product is out of stock.'}</p> {l s='Displayed text when back-ordereding is allowed:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->available_later
input_name='available_later'}
</div>
</div>
</div>
{if !$countAttributes}
<label for="available_date">{l s='Available date:'}</label>
<input id="available_date" name="available_date" value="{$product->available_date}" class="datepicker" type="text" />
<p>{l s='The available date when this product is out of stock.'}</p>
{/if}
{/if} {/if}
{/if}
<script type="text/javascript"> <script type="text/javascript">
var quantities_ajax_success = '{l s='Data saved'}'; var quantities_ajax_success = '{l s='Data saved'}';
var quantities_ajax_waiting = '{l s='Saving data...'}'; var quantities_ajax_waiting = '{l s='Saving data...'}';
</script> </script>
</fieldset>
{/if} {/if}
{*$default_language*} {*$default_language*}
@@ -22,96 +22,100 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<input type="hidden" name="submitted_tabs[]" value="Seo" /> <fieldset>
<h3>{l s='SEO'}</h3> <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"> <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"} {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}"> <label class="control-label col-lg-3" for="meta_title_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Product page title: Leave blank to use the product name'}"> title="{l s='Product page title: Leave blank to use the product name'}">
{l s='Meta title:'} {l s='Meta title:'}
</span> </span>
</label> </label>
<div class="col-lg-8"> <div class="col-lg-8">
<div class="row"> <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">
{include file="controllers/products/input_text_lang.tpl" {include file="controllers/products/input_text_lang.tpl"
languages=$languages languages=$languages
input_value=$product->link_rewrite input_name='meta_title'
input_name='link_rewrite'} 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> </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>
</div> </div>
</div>
<div class="row"> <div class="row">
<div class="col-lg-9 col-offset-3"> <div class="col-lg-9 col-offset-3">
<div class="alert alert-block"> {foreach from=$languages item=language}
<i class="icon-link"></i> {l s='The product link will look like this:'} <div class="alert alert-block translatable-field lang-{$language.id_lang}">
{$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 <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_{$language.id_lang}">{$product->link_rewrite[$default_language]}</span>.html
</div>
{/foreach}
</div> </div>
</div> </div>
</div> </fieldset>
@@ -22,90 +22,91 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * 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" /> {if isset($display_common_field) && $display_common_field}
<h3>{l s='Shipping'}</h3> <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="row">
<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> <label class="control-label col-lg-5" for="width">{l s='Width (package):'}</label>
{/if} <div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<div class="row"> <input maxlength="6" id="width" name="width" type="text" value="{$product->width}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
<label class="control-label col-lg-5" for="width">{l s='Width (package):'}</label> {$bullet_common_field}
<div class="input-group col-lg-2"> </div>
<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"> <div class="row">
<label class="control-label col-lg-5" for="height">{l s='Height (package):'}</label> <label class="control-label col-lg-5" for="height">{l s='Height (package):'}</label>
<div class="input-group col-lg-2"> <div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span> <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, '.');" /> <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} {$bullet_common_field}
</div>
</div> </div>
</div>
<div class="row"> <div class="row">
<label class="control-label col-lg-5" for="depth">{l s='Depth (package):'}</label> <label class="control-label col-lg-5" for="depth">{l s='Depth (package):'}</label>
<div class="input-group col-lg-2"> <div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span> <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, '.');" /> <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} {$bullet_common_field}
</div>
</div> </div>
</div>
<div class="row"> <div class="row">
<label class="control-label col-lg-5" for="weight">{l s='Weight (package):'}</label> <label class="control-label col-lg-5" for="weight">{l s='Weight (package):'}</label>
<div class="input-group col-lg-2"> <div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_weight_unit}</span> <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, '.');" /> <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} {$bullet_common_field}
</div>
</div> </div>
</div>
<div class="row"> <div class="row">
<label class="control-label col-lg-5" for="additional_shipping_cost"> <label class="control-label col-lg-5" for="additional_shipping_cost">
<span class="label-tooltip" data-toggle="tooltip" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='A carrier tax will be applied.'}"> title="{l s='A carrier tax will be applied.'}">
{l s='Additional shipping cost (per quantity):'} {l s='Additional shipping cost (per quantity):'}
</span> </span>
</label> </label>
<div class="input-group col-lg-2"> <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> <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}" /> <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>
<div class="row"> <div class="row">
<label class="control-label col-lg-5" for="availableCarriers">{l s='Carriers:'}</label> <label class="control-label col-lg-5" for="availableCarriers">{l s='Carriers:'}</label>
<div class="input-group col-lg-7"> <div class="input-group col-lg-7">
<div class="row"> <div class="row">
<div class="col-lg-6"> <div class="col-lg-6">
<label for="availableCarriers">{l s='Available carriers'}</label> <label for="availableCarriers">{l s='Available carriers'}</label>
<select multiple id="availableCarriers" name="availableCarriers"> <select multiple id="availableCarriers" name="availableCarriers">
{foreach $carrier_list as $carrier} {foreach $carrier_list as $carrier}
{if !isset($carrier.selected) || !$carrier.selected} {if !isset($carrier.selected) || !$carrier.selected}
<option value="{$carrier.id_reference}">{$carrier.name}</option> <option value="{$carrier.id_reference}">{$carrier.name}</option>
{/if} {/if}
{/foreach} {/foreach}
</select> </select>
<a href="#" id="addCarrier" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a> <a href="#" id="addCarrier" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
<label for="selectedCarriers">{l s='Selected carriers'}</label> <label for="selectedCarriers">{l s='Selected carriers'}</label>
<select multiple id="selectedCarriers" name="selectedCarriers[]"> <select multiple id="selectedCarriers" name="selectedCarriers[]">
{foreach $carrier_list as $carrier} {foreach $carrier_list as $carrier}
{if isset($carrier.selected) && $carrier.selected} {if isset($carrier.selected) && $carrier.selected}
<option value="{$carrier.id_reference}">{$carrier.name}</option> <option value="{$carrier.id_reference}">{$carrier.name}</option>
{/if} {/if}
{/foreach} {/foreach}
</select> </select>
<a href="#" id="removeCarrier" class="btn btn-default btn-block"><i class="icon-arrow-left"></i> {l s='Remove'}</a> <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>
</div> </div>
</div> </fieldset>
@@ -25,6 +25,7 @@
<input type="hidden" name="supplier_loaded" value="1"> <input type="hidden" name="supplier_loaded" value="1">
{if isset($product->id)} {if isset($product->id)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Suppliers" /> <input type="hidden" name="submitted_tabs[]" value="Suppliers" />
<h3>{l s='Suppliers of the current product'}</h3> <h3>{l s='Suppliers of the current product'}</h3>
<div class="alert alert-info"> <div class="alert alert-info">
@@ -60,7 +61,8 @@
<a class="btn btn-link bt-icon confirm_leave" href="{$link->getAdminLink('AdminSuppliers')|escape:'htmlall':'UTF-8'}&addsupplier"> <a class="btn btn-link bt-icon confirm_leave" href="{$link->getAdminLink('AdminSuppliers')|escape:'htmlall':'UTF-8'}&addsupplier">
<i class="icon-plus"></i> {l s='Create a new supplier'} <i class="icon-external-link-sign"></i> <i class="icon-plus"></i> {l s='Create a new supplier'} <i class="icon-external-link-sign"></i>
</a> </a>
</fieldset>
<fieldset>
<h3>{l s='Product reference(s)'}</h3> <h3>{l s='Product reference(s)'}</h3>
<div class="alert alert-info"> <div class="alert alert-info">
@@ -130,4 +132,5 @@
</div> </div>
{/foreach} {/foreach}
</div> </div>
</fieldset>
{/if} {/if}
@@ -25,8 +25,9 @@
<input type="hidden" name="warehouse_loaded" value="1"> <input type="hidden" name="warehouse_loaded" value="1">
{if isset($product->id)} {if isset($product->id)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Warehouses" /> <input type="hidden" name="submitted_tabs[]" value="Warehouses" />
<h4>{l s='Product location in warehouses'}</h4> <h3>{l s='Product location in warehouses'}</h3>
<div class="separation"></div> <div class="separation"></div>
<div class="alert alert-info" style="display:block; position:'auto';"> <div class="alert alert-info" style="display:block; position:'auto';">
<p>{l s='This interface allows you to specify the warehouse in which the product is stocked.'}</p> <p>{l s='This interface allows you to specify the warehouse in which the product is stocked.'}</p>
@@ -38,51 +39,57 @@
<img src="../img/admin/add.gif" alt="{l s='Create a new warehouse'}" title="{l s='Create a new warehouse'}" /><span>{l s='Create a new warehouse'}</span> <img src="../img/admin/add.gif" alt="{l s='Create a new warehouse'}" title="{l s='Create a new warehouse'}" /><span>{l s='Create a new warehouse'}</span>
</a> </a>
<div id="warehouse_accordion" style="margin-top:10px; display:block;"> <div id="warehouse_accordion">
{foreach from=$warehouses item=warehouse} {foreach from=$warehouses item=warehouse}
<h3 style="margin-bottom:0;"><a href="#">{$warehouse['name']}</a></h3> <div class="accordion-group">
<div style="display:block;"> <div class="accordion-heading">
<table cellpadding="10" cellspacing="0" class="table"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#warehouse-{$warehouse['name']}">{$warehouse['name']}</a>
<tr> </div>
<th width="100">{l s='Stored'}</th> <div id="warehouse-{$warehouse['name']}" class="accordion-body collapse in">
<th>{l s='Product'}</th> <div class="accordion-inner">
<th width="150">{l s='Location (optional)'}</th> <table cellpadding="10" cellspacing="0" class="table">
</tr> <tr>
{foreach $attributes AS $index => $attribute} <th width="100">{l s='Stored'}</th>
{assign var=location value=''} <th>{l s='Product'}</th>
{assign var=selected value=''} <th width="150">{l s='Location (optional)'}</th>
{foreach from=$associated_warehouses item=aw} </tr>
{if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']} {foreach $attributes AS $index => $attribute}
{assign var=location value=$aw->location} {assign var=location value=''}
{assign var=selected value=true} {assign var=selected value=''}
{foreach from=$associated_warehouses item=aw}
{if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']}
{assign var=location value=$aw->location}
{assign var=selected value=true}
{/if}
{/foreach}
<tr {if $index is odd}class="alt_row"{/if}>
<td><input type="checkbox"
name="check_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
{if $selected == true}checked="checked"{/if}
value="1" />
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
<td><input type="text"
name="location_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
value="{$location|escape:'htmlall':'UTF-8'}"
size="20" />
</td>
</tr>
{/foreach}
<tr>
<td colspan="3">&nbsp;</td>
</tr>
{if $attributes|@count gt 1}
<tr>
<td><input type="checkbox" class="check_all_warehouse" value="check_warehouse_{$warehouse['id_warehouse']}" /></td>
<td colspan="2"><i>{l s='Mark all products as stored in this warehouse.'}</i></td>
</tr>
{/if} {/if}
{/foreach} </table>
<tr {if $index is odd}class="alt_row"{/if}> </div>
<td><input type="checkbox" </div>
name="check_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
{if $selected == true}checked="checked"{/if}
value="1" />
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
<td><input type="text"
name="location_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
value="{$location|escape:'htmlall':'UTF-8'}"
size="20" />
</td>
</tr>
{/foreach}
<tr>
<td colspan="3">&nbsp;</td>
</tr>
{if $attributes|@count gt 1}
<tr>
<td><input type="checkbox" class="check_all_warehouse" value="check_warehouse_{$warehouse['id_warehouse']}" /></td>
<td colspan="2"><i>{l s='Mark all products as stored in this warehouse.'}</i></td>
</tr>
{/if}
</table>
</div> </div>
{/foreach} {/foreach}
</div> </div>
<p>&nbsp;</p> <fieldset>
{/if} {/if}
@@ -48,7 +48,6 @@
<div class="alert alert-info">{$field}</div> <div class="alert alert-info">{$field}</div>
{elseif $key == 'input'} {elseif $key == 'input'}
{foreach $field as $input} {foreach $field as $input}
<div class="row {if $input.type == 'hidden'}hide{/if}"> <div class="row {if $input.type == 'hidden'}hide{/if}">
{if $input.type == 'hidden'} {if $input.type == 'hidden'}
<input type="hidden" name="{$input.name}" id="{$input.name}" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" /> <input type="hidden" name="{$input.name}" id="{$input.name}" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" />
@@ -58,7 +57,7 @@
{/if} {/if}
{block name="label"} {block name="label"}
{if isset($input.label)} {if isset($input.label)}
<label for="{if isset($input.id)}{$input.id}{if isset($input.lang) AND $input.lang}_{$language.id_lang}{/if}{else}{$input.name}{if isset($input.lang) AND $input.lang}_{$language.id_lang}{/if}{/if}" class="control-label col-lg-3 {if isset($input.required) && $input.required && $input.type != 'radio'}required{/if}"> <label for="{if isset($input.id)}{$input.id}{if isset($input.lang) AND $input.lang}_{$current_id_lang}{/if}{else}{$input.name}{if isset($input.lang) AND $input.lang}_{$current_id_lang}{/if}{/if}" class="control-label col-lg-3 {if isset($input.required) && $input.required && $input.type != 'radio'}required{/if}">
{if isset($input.hint)} {if isset($input.hint)}
<span class="label-tooltip" data-toggle="tooltip" <span class="label-tooltip" data-toggle="tooltip"
title=" title="
@@ -75,11 +74,12 @@
{/if} {/if}
"> ">
{/if} {/if}
{$input.label} {$input.label}
{if isset($input.hint)} {if isset($input.hint)}
</span> </span>
{/if} {/if}
</label>{/if} </label>
{/if}
{/block} {/block}
{block name="field"} {block name="field"}
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" title="{$action}" class=""> <a href="{$href}" title="{$action}">
<i class="icon-circle-arrow-up"></i> {$action} <i class="icon-circle-arrow-up"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" class="" title="{$action}" {if isset($name)}name="{$name}"{/if}> <a href="{$href}" title="{$action}" {if isset($name)}name="{$name}"{/if}>
<i class="icon-asterisk"></i> {$action} <i class="icon-asterisk"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" class="" {if isset($confirm)}onclick="if (confirm('{$confirm}')){ return true; }else{ event.stopPropagation(); event.preventDefault();};"{/if} title="{$action}"> <a href="{$href}" {if isset($confirm)}onclick="if (confirm('{$confirm}')){ return true; }else{ event.stopPropagation(); event.preventDefault();};"{/if} title="{$action}">
<i class="icon-trash"></i> {$action} <i class="icon-trash"></i> {$action}
</a> </a>
@@ -23,6 +23,6 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="#" class="" id="details_{$params.action}_{$id}" title="{$action}" onclick="display_action_details('{$id}', '{$controller}', '{$token}', '{$params.action}', {$json_params|escape}); return false"> <a href="#" id="details_{$params.action}_{$id}" title="{$action}" onclick="display_action_details('{$id}', '{$controller}', '{$token}', '{$params.action}', {$json_params|escape}); return false">
<i class="icon-collapse"></i> {$action} <i class="icon-collapse"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="#" class="" title="{$action}" onclick="if (confirm('{$confirm}')) document.location = '{$location_ok}'; else document.location = '{$location_ko}'; return false;"> <a href="#" title="{$action}" onclick="if (confirm('{$confirm}')) document.location = '{$location_ok}'; else document.location = '{$location_ko}'; return false;">
<i class="icon-copy"></i> {$action} <i class="icon-copy"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" class="" title="{$action}"> <a href="{$href}" title="{$action}" class="edit">
<i class="icon-pencil"></i> {$action} <i class="icon-pencil"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" title="{$action}" class=""> <a href="{$href}" title="{$action}">
<i class="icon-circle-arrow-down"></i> {$action} <i class="icon-circle-arrow-down"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" title="{$action}" class=""> <a href="{$href}" title="{$action}">
<i class="icon-truck"></i> {$action} <i class="icon-truck"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" title="{$action}" class=""> <a href="{$href}" title="{$action}">
<i class="icon-time"></i> {$action} <i class="icon-time"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" class="" onclick="return confirm('{$confirm}');" title="{$action}"> <a href="{$href}" onclick="return confirm('{$confirm}');" title="{$action}">
<i class="icon-copy"></i> {$action} <i class="icon-copy"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" class="" title="{$action}"> <a href="{$href}" title="{$action}">
<i class="icon-truck"></i> {$action} <i class="icon-truck"></i> {$action}
</a> </a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<a href="{$href}" class="" title="{$action}"> <a href="{$href}" title="{$action}">
<i class="icon-exchange"></i> {$action} <i class="icon-exchange"></i> {$action}
</a> </a>
@@ -27,7 +27,7 @@
{foreach $list AS $index => $tr} {foreach $list AS $index => $tr}
<tr <tr
{if $position_identifier}id="tr_{$id_category}_{$tr.$identifier}_{if isset($tr.position['position'])}{$tr.position['position']}{else}0{/if}"{/if} {if $position_identifier}id="tr_{$id_category}_{$tr.$identifier}_{if isset($tr.position['position'])}{$tr.position['position']}{else}0{/if}"{/if}
class="{if $index is odd}alt_row{/if} {if $row_hover}row_hover{/if}" class="{if $index is odd}alt_row{/if}{if $row_hover} row_hover{/if}{if isset($tr.class)} {$tr.class}{/if}"
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if} {if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
> >
<td class="center"> <td class="center">
@@ -147,7 +147,7 @@
{/foreach} {/foreach}
{if $compiled_actions|count > 0} {if $compiled_actions|count > 0}
<div class="btn-group{if $compiled_actions|count > 1} btn-group-action{/if}"> <div class="btn-group{if $compiled_actions|count > 1} btn-group-action{/if}">
{$compiled_actions[0]|replace:'class=""':'class="btn btn-default btn-small"'} {$compiled_actions[0]|regex_replace:'/class\s*=\s*"(\w*)"/':'class="$1 btn btn-default"'}
{if $compiled_actions|count > 1} {if $compiled_actions|count > 1}
<button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown"> <button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>&nbsp; <span class="caret"></span>&nbsp;
@@ -45,7 +45,7 @@
<li{if $params.text == 'divider'} class="divider"{/if}> <li{if $params.text == 'divider'} class="divider"{/if}>
{if $params.text != 'divider'} {if $params.text != 'divider'}
<a href="#" onclick="{if isset($params.confirm)}if (confirm('{$params.confirm}')){/if}sendBulkAction($(this).closest('form').get(0), 'submitBulk{$key}{$table}');"> <a href="#" onclick="{if isset($params.confirm)}if (confirm('{$params.confirm}')){/if}sendBulkAction($(this).closest('form').get(0), 'submitBulk{$key}{$table}');">
<i class="{$params.icon}"></i>&nbsp;{$params.text} {if isset($params.icon)}<i class="{$params.icon}"></i>{/if}&nbsp;{$params.text}
</a> </a>
{/if} {/if}
</li> </li>
+1
View File
@@ -157,6 +157,7 @@ class HelperFormCore extends Helper
'identifier' => $this->identifier, 'identifier' => $this->identifier,
'name_controller' => $this->name_controller, 'name_controller' => $this->name_controller,
'languages' => $this->languages, 'languages' => $this->languages,
'current_id_lang' => $this->context->language->id,
'defaultFormLanguage' => $this->default_form_language, 'defaultFormLanguage' => $this->default_form_language,
'allowEmployeeFormLang' => $this->allow_employee_form_lang, 'allowEmployeeFormLang' => $this->allow_employee_form_lang,
'form_id' => $this->id, 'form_id' => $this->id,
@@ -245,7 +245,9 @@ class AdminManufacturersControllerCore extends AdminController
'name' => 'short_description', 'name' => 'short_description',
'lang' => true, 'lang' => true,
'class' => 'rte', 'class' => 'rte',
'hint' => $this->l('Invalid characters:').' <>;=#{}' 'hint' => $this->l('Invalid characters:').' <>;=#{}',
'rows' => 2,
'cols' => 10
), ),
array( array(
'type' => 'textarea', 'type' => 'textarea',
@@ -253,7 +255,9 @@ class AdminManufacturersControllerCore extends AdminController
'name' => 'description', 'name' => 'description',
'lang' => true, 'lang' => true,
'class' => 'rte', 'class' => 'rte',
'hint' => $this->l('Invalid characters:').' <>;=#{}' 'hint' => $this->l('Invalid characters:').' <>;=#{}',
'rows' => 2,
'cols' => 10
), ),
array( array(
'type' => 'file', 'type' => 'file',
@@ -483,7 +487,9 @@ class AdminManufacturersControllerCore extends AdminController
'label' => $this->l('Other:'), 'label' => $this->l('Other:'),
'name' => 'other', 'name' => 'other',
'required' => false, 'required' => false,
'hint' => $this->l('Forbidden characters:').' <>;=#{}' 'hint' => $this->l('Forbidden characters:').' <>;=#{}',
'rows' => 2,
'cols' => 10
); );
$form['submit'] = array( $form['submit'] = array(
'title' => $this->l('Save '), 'title' => $this->l('Save '),
@@ -3273,8 +3273,9 @@ class AdminProductsControllerCore extends AdminController
} }
} }
$content .= ' $content .= '
</tbody> </tbody>
</table>'; </table>
</fieldset>';
$content .= ' $content .= '
<script type="text/javascript"> <script type="text/javascript">
@@ -3301,7 +3302,7 @@ class AdminProductsControllerCore extends AdminController
// Reindex array starting from 0 // Reindex array starting from 0
$specific_price_priorities = array_values($specific_price_priorities); $specific_price_priorities = array_values($specific_price_priorities);
$content .= ' $content .= '<fieldset>
<h3>'.$this->l('Priority management').'</h3> <h3>'.$this->l('Priority management').'</h3>
<div class="alert alert-info"> <div class="alert alert-info">
'.$this->l('Sometimes one customer can fit into multiple price rules. Priorities allow you to define which rule applies to the customer.').' '.$this->l('Sometimes one customer can fit into multiple price rules. Priorities allow you to define which rule applies to the customer.').'
@@ -3348,6 +3349,7 @@ class AdminProductsControllerCore extends AdminController
</p> </p>
</div> </div>
</div> </div>
</fieldset>
'; ';
return $content; return $content;
} }
@@ -3758,7 +3760,7 @@ class AdminProductsControllerCore extends AdminController
$this->addRowAction('default'); $this->addRowAction('default');
$this->addRowAction('delete'); $this->addRowAction('delete');
$color_by_default = '#BDE5F8'; $default_class = 'highlighted';
$this->fields_list = array( $this->fields_list = array(
'attributes' => array('title' => $this->l('Attributes'), 'align' => 'left'), 'attributes' => array('title' => $this->l('Attributes'), 'align' => 'left'),
@@ -3821,7 +3823,7 @@ class AdminProductsControllerCore extends AdminController
if ($product_attribute['default_on']) if ($product_attribute['default_on'])
{ {
$comb_array[$id_product_attribute]['name'] = 'is_default'; $comb_array[$id_product_attribute]['name'] = 'is_default';
$comb_array[$id_product_attribute]['color'] = $color_by_default; $comb_array[$id_product_attribute]['class'] = $default_class;
} }
} }
} }
+22 -10
View File
@@ -553,7 +553,8 @@ product_tabs['Prices'] = new function(){
this.bindDelete = function(){ this.bindDelete = function(){
$('#specific_prices_list').delegate('a[name="delete_link"]', 'click', function(e){ $('#specific_prices_list').delegate('a[name="delete_link"]', 'click', function(e){
e.preventDefault(); e.preventDefault();
self.deleteSpecificPrice(this.href, $(this).parents('tr')); if (confirm(delete_price_rule))
self.deleteSpecificPrice(this.href, $(this).parents('tr'));
}) })
}; };
@@ -1322,17 +1323,20 @@ product_tabs['Suppliers'] = new function(){
// @TODO: a better way to fix the accordion wrong size bug when the selected page is this page // @TODO: a better way to fix the accordion wrong size bug when the selected page is this page
setTimeout(function() { setTimeout(function() {
$('#suppliers_accordion').accordion(); $('#suppliers_accordion').accordion({
// If one second was not enough to display page, another resize is needed collapsible: true,
setTimeout(function() { autoHeight: true,
$('#suppliers_accordion').accordion({ heightStyle: "fill" }); heightStyle: "content"});
}, 3000);
}, 1000); }, 1000);
// Resize the accordion once the page is visible because of the bug with accordions initialized // Resize the accordion once the page is visible because of the bug with accordions initialized
// inside a display:none block not having the correct size. // inside a display:none block not having the correct size.
$('#suppliers_accordion').parents('.product-tab-content').bind('displayed', function(){ $('#suppliers_accordion').parents('.product-tab-content').bind('displayed', function(){
$('#suppliers_accordion').accordion({ heightStyle: "fill" }); $('#suppliers_accordion').accordion({
collapsible: true,
autoHeight: true,
heightStyle: "content"
});
}); });
}; };
} }
@@ -1434,13 +1438,21 @@ product_tabs['Warehouses'] = new function(){
// @TODO: a better way to fix the accordion wrong size bug when the selected page is this page // @TODO: a better way to fix the accordion wrong size bug when the selected page is this page
setTimeout(function() { setTimeout(function() {
$('#warehouse_accordion').accordion(); $('#warehouse_accordion').accordion({
}, 500); collapsible: true,
autoHeight: true,
heightStyle: "content"
});
}, 1000);
// Resize the accordion once the page is visible because of the bug with accordions initialized // Resize the accordion once the page is visible because of the bug with accordions initialized
// inside a display:none block not having the correct size. // inside a display:none block not having the correct size.
$('#warehouse_accordion').parents('.product-tab-content').bind('displayed', function(){ $('#warehouse_accordion').parents('.product-tab-content').bind('displayed', function(){
$('#warehouse_accordion').accordion("refresh"); $('#warehouse_accordion').accordion({
collapsible: true,
autoHeight: true,
heightStyle: "content"
});
}); });
}; };
} }
+14 -8
View File
@@ -126,18 +126,29 @@ function updateCurrentText()
{ {
$('#current_product').html($('#name_' + id_language).val()); $('#current_product').html($('#name_' + id_language).val());
} }
function updateFriendlyURLByName() function updateFriendlyURLByName()
{ {
$('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val(), 'UTF-8')); $('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val(), 'UTF-8'));
$('#friendly-url').html($('#link_rewrite_' + id_language).val()); $('#friendly-url_' + id_language).html($('#link_rewrite_' + id_language).val());
} }
function updateFriendlyURL() function updateFriendlyURL()
{
var link = $('#link_rewrite_' + id_language);
if (link[0])
{
$('#friendly-url_' + id_language).text(str2url($('#link_rewrite_' + id_language).val(), 'UTF-8'));
}
}
function updateLinkRewrite()
{ {
var link = $('#link_rewrite_' + id_language); var link = $('#link_rewrite_' + id_language);
if (link[0]) if (link[0])
{ {
link.val(str2url($('#link_rewrite_' + id_language).val(), 'UTF-8')); link.val(str2url($('#link_rewrite_' + id_language).val(), 'UTF-8'));
$('#seo #friendly-url').text(link.val()); $('#friendly-url_' + id_language).text(link.val());
} }
} }
@@ -161,12 +172,6 @@ function changeLanguage(field, fieldsString, id_language_new, iso_code)
id_language = id_language_new; id_language = id_language_new;
} }
function changeFormLanguage(id_language_new, iso_code, employee_cookie) function changeFormLanguage(id_language_new, iso_code, employee_cookie)
{ {
$('.translatable').each(function() { $('.translatable').each(function() {
@@ -1041,6 +1046,7 @@ function hideOtherLanguage(id)
{ {
$('.translatable-field').hide(); $('.translatable-field').hide();
$('.lang-' + id).show(); $('.lang-' + id).show();
id_language = id;
} }
function sendBulkAction(form, action) function sendBulkAction(form, action)