// MERGE product_multistore branch : product fields are now editable per shop
This commit is contained in:
@@ -18,6 +18,7 @@ fieldset{background-color:#EBEDF4; border:1px solid #CCCED7; color:#585A69; font
|
||||
.Bloc {background-color:#EBEDF4; border:1px solid #CCCED7;font-size:1.1em;margin:0;padding:1em}
|
||||
legend{background:#EBEDF4;border:1px solid #CCCED7;font-weight:700;margin:0;padding:.2em .5em;text-align:left}
|
||||
input[type="text"],input[type="password"],input[type="file"],textarea {border:1px solid #ccc; background-color:#fff;}
|
||||
input[type="text"]:disabled,input[type="password"]:disabled,input[type="file"]:disabled,textarea:disabled {border:1px solid #ccc; background-color:#dedede; color: #444444;}
|
||||
select { border:1px solid #ccc; font-size: 12px;}
|
||||
select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disabled"], option[disabled="disabled"] {border: 1px solid #CCCCCC;color: #AAAAAA}
|
||||
.header_module{background:url('../img/header_module.png');padding-left: 0.5em;padding-top: 0.8em;height:20px;color: #812143;border:solid 1px #CCC;}
|
||||
@@ -182,9 +183,9 @@ a.module_toggle_all{color: #268CCD;}
|
||||
.multishop_toolbar select.shopList { width: 300px; }
|
||||
.multishop_toolbar a.chzn-single { background: url('../img/icon-multishop.png') no-repeat 5px 5px; padding: 1px 2px 2px 25px; font-weight: bold; }
|
||||
|
||||
.multishop_toolbar .chzn-container .first{font-weight: bold;background-color: #408BD5;color: #ffffff;}
|
||||
.multishop_toolbar .chzn-container .group{font-weight: bold;font-style: italic;padding-left: 15px;background-color: #C6DEFC;}
|
||||
.multishop_toolbar .chzn-container .shop{padding-left: 30px;background-color: #EAF2FC;}
|
||||
.multishop_toolbar .chzn-container .chzn-results .first{font-weight: bold;background-color: #408BD5;color: #ffffff;}
|
||||
.multishop_toolbar .chzn-container .chzn-results .group{font-weight: bold;font-style: italic;padding-left: 15px;background-color: #C6DEFC;}
|
||||
.multishop_toolbar .chzn-container .chzn-results .shop{padding-left: 30px;background-color: #EAF2FC;}
|
||||
|
||||
/*toolbarBox*/
|
||||
.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 321 B |
@@ -69,10 +69,10 @@
|
||||
var changeAssociationGroup = function()
|
||||
{
|
||||
var id_attribute_group = $('#id_attribute_group').val();
|
||||
$('.input_group_shop').each(function(k, item)
|
||||
$('.input_shop_group').each(function(k, item)
|
||||
{
|
||||
var id_group_shop = $(item).val();
|
||||
if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_group_shop, shop_associations[id_attribute_group]) > -1)
|
||||
var id_shop_group = $(item).val();
|
||||
if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_shop_group, shop_associations[id_attribute_group]) > -1)
|
||||
$(item).attr('disabled', false);
|
||||
else
|
||||
{
|
||||
|
||||
@@ -66,12 +66,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{if $feature_shop_active}
|
||||
<div class="separation"></div>
|
||||
{* @todo use asso_shop from Helper *}
|
||||
<label>{l s='Shop association:'}</label>
|
||||
{$displayAssoShop}
|
||||
{/if}
|
||||
|
||||
<div class="separation"></div>
|
||||
<table>
|
||||
|
||||
@@ -40,9 +40,19 @@
|
||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,|,fullscreen",
|
||||
theme_advanced_buttons4 : "styleprops,|,cite,abbr,acronym,del,ins,attribs,pagebreak",
|
||||
setup : function(ed) {
|
||||
|
||||
{* Count the total number of the field *}
|
||||
|
||||
ed.onInit.add(function(ed)
|
||||
{
|
||||
if (typeof load_tinymce_multishop[ed.id] != 'undefined')
|
||||
{
|
||||
if (typeof load_tinymce_multishop[ed.id])
|
||||
ed.hide();
|
||||
else
|
||||
ed.show();
|
||||
}
|
||||
});
|
||||
|
||||
ed.onKeyUp.add(function(ed, e) {
|
||||
tinyMCE.triggerSave();
|
||||
textarea = $('#'+ed.id);
|
||||
@@ -94,8 +104,12 @@
|
||||
var save_error = {if $save_error}true{else}false{/if};
|
||||
|
||||
var product_type = {$product_type};
|
||||
{*var mce_maximum = '{l s='Maximum'}';
|
||||
var mce_characters = '{l s='characters'}';*}
|
||||
{*var mce_maximum = '{l s='Maximum'}';*}
|
||||
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
|
||||
var display_multishop_checkboxes = true;
|
||||
{else}
|
||||
var display_multishop_checkboxes = false;
|
||||
{/if}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
|
||||
@@ -23,18 +23,74 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $check_product_association_ajax}
|
||||
{assign var=class_input_ajax value='check_product_name '}
|
||||
{else}
|
||||
{assign var=class_input_ajax value=''}
|
||||
{/if}
|
||||
<input type="hidden" name="submitted_tabs[]" value="Informations" />
|
||||
<div id="step1">
|
||||
<h4 class="tab">1. {l s='Info.'}</h4>
|
||||
<h4>{l s='Product global information'}</h4>
|
||||
<script type="text/javascript">
|
||||
{$combinationImagesJs}
|
||||
{if $check_product_association_ajax}
|
||||
var search_term = '';
|
||||
$('document').ready( function() {
|
||||
$(".check_product_name")
|
||||
.autocomplete(
|
||||
'{$link->getAdminLink('AdminProducts', true)}', {
|
||||
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?'} <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="warn" 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 class="separation"></div>
|
||||
|
||||
<div>
|
||||
<label class="text">{l s='Type:'}</label>
|
||||
<label class="text">{$bullet_common_field} {l s='Type:'}</label>
|
||||
<input type="radio" name="type_product" id="simple_product" value="{Product::PTYPE_SIMPLE}" {if $product_type == Product::PTYPE_SIMPLE}checked="checked"{/if} />
|
||||
<label class="radioCheck" for="simple_product">{l s='Product'}</label>
|
||||
<input type="radio" name="type_product" id="pack_product" value="{Product::PTYPE_PACK}" {if $product_type == Product::PTYPE_PACK}checked="checked"{/if} />
|
||||
@@ -48,35 +104,37 @@
|
||||
<table cellpadding="5" style="width: 50%; float: left; margin-right: 20px; border-right: 1px solid #CCCCCC;">
|
||||
{* global information *}
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Name:'}</label></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="name" type="default" multilang="true"}
|
||||
<label>{l s='Name:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;" class="translatable">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if} float: left;">
|
||||
<input class="{if !$product->id}copy2friendlyUrl{/if} updateCurrentText" size="43" type="text" {if !$product->id}disabled="disabled"{/if}
|
||||
<input class="{$class_input_ajax}{if !$product->id}copy2friendlyUrl{/if} updateCurrentText" size="43" type="text" {if !$product->id}disabled="disabled"{/if}
|
||||
id="name_{$language.id_lang}" name="name_{$language.id_lang}"
|
||||
value="{$product->name[$language.id_lang]|htmlentitiesUTF8|default:''}"/><sup> *</sup>
|
||||
<span class="hint" name="help_box">{l s='Invalid characters:'} <>;=#{}<span class="hint-pointer"> </span>
|
||||
</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Reference:'}</label></td>
|
||||
<td class="col-left"><label>{$bullet_common_field} {l s='Reference:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="55" type="text" name="reference" value="{$product->reference|htmlentitiesUTF8}" style="width: 130px; margin-right: 44px;" />
|
||||
<span class="hint" name="help_box">{l s='Special characters allowed:'}.-_#\<span class="hint-pointer"> </span></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='EAN13 or JAN:'}</label></td>
|
||||
<td class="col-left"><label>{$bullet_common_field} {l s='EAN13 or JAN:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="55" maxlength="13" type="text" name="ean13" value="{$product->ean13|htmlentitiesUTF8}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(Europe, Japan)'}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='UPC:'}</label></td>
|
||||
<td class="col-left"><label>{$bullet_common_field} {l s='UPC:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="55" maxlength="12" type="text" name="upc" value="{$product->upc}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(US, Canada)'}</span>
|
||||
</td>
|
||||
@@ -86,6 +144,7 @@
|
||||
<table cellpadding="5" style="width: 40%; float: left; margin-left: 10px;">
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
|
||||
<label class="text">{l s='Status:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
@@ -102,7 +161,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Visibility:'}</label></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"}
|
||||
<label>{l s='Visibility:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="visibility" id="visibility">
|
||||
<option value="both" {if $product->visibility == 'both'}selected="selected"{/if} >{l s='Everywhere'}</option>
|
||||
@@ -113,7 +175,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="product_options" {if !$product->active}style="display:none"{/if} >
|
||||
<td class="col-left"><label>{l s='Options:'}</label></td>
|
||||
<td class="col-left">
|
||||
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
|
||||
<div class="multishop_product_checkbox">
|
||||
<ul class="listForm">
|
||||
<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"}</li>
|
||||
<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"}</li>
|
||||
<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<label>{l s='Options:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<ul class="listForm">
|
||||
<li>
|
||||
@@ -128,10 +202,14 @@
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Condition:'}</label></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"}
|
||||
<label>{l s='Condition:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="condition" id="condition">
|
||||
<option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option>
|
||||
@@ -140,13 +218,16 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<table cellpadding="5" cellspacing="0" border="0" style="width: 100%;"><tr><td><div class="separation"></div></td></tr></table>
|
||||
<table cellspacing="0" cellpadding="5" border="0">
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Short description:'}<br /></label><p class="product_description">({l s='appears in the product lists and on the top of the product page'})</p></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="description_short" type="tinymce" multilang="true"}
|
||||
<label>{l s='Short description:'}<br /></label>
|
||||
<p class="product_description">({l s='appears in the product lists and on the top of the product page'})</p>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{include file="controllers/products/textarea_lang.tpl"
|
||||
languages=$languages
|
||||
@@ -157,7 +238,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Description:'}<br /></label><p class="product_description">({l s='appears in the body of the product page'})</p></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="description" type="tinymce" multilang="true"}
|
||||
<label>{l s='Description:'}<br /></label>
|
||||
<p class="product_description">({l s='appears in the body of the product page'})</p>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{include file="controllers/products/textarea_lang.tpl" languages=$languages
|
||||
input_name='description'
|
||||
@@ -257,4 +342,3 @@
|
||||
</table>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
|
||||
<label style="float: none">
|
||||
<input type="checkbox" style="vertical-align: text-bottom" onclick="$('input[name^=\'multishop_check[\']').attr('checked', this.checked); multishopCheckAllProductFields{$product_tab}()" />
|
||||
{l s='Check / uncheck all (you are editing this page for several shops, some fields like "name" or "price" are disabled, you have to check these fields in order to edit them for these shops)'}
|
||||
</label>
|
||||
{/if}
|
||||
@@ -0,0 +1,51 @@
|
||||
{*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
|
||||
{if isset($multilang) && $multilang}
|
||||
{if isset($only_checkbox)}
|
||||
{foreach from=$languages item=language}
|
||||
<input type="checkbox" name="multishop_check[{$field}][{$language.id_lang}]" value="1" onclick="multishopCheckProductField(this.checked, '{$field}_{$language.id_lang}', '{$type}')" {if !empty($multishop_check[$field][$language.id_lang])}checked="checked"{/if} />
|
||||
{/foreach}
|
||||
{else}
|
||||
<div class="multishop_product_checkbox">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="multishop_lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if}">
|
||||
<input type="checkbox" name="multishop_check[{$field}][{$language.id_lang}]" value="1" onclick="multishopCheckProductField(this.checked, '{$field}_{$language.id_lang}', '{$type}')" {if !empty($multishop_check[$field][$language.id_lang])}checked="checked"{/if} />
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
{if isset($only_checkbox)}
|
||||
<input type="checkbox" name="multishop_check[{$field}]" value="1" onclick="multishopCheckProductField(this.checked, '{$field}', '{$type}')" {if !empty($multishop_check[$field])}checked="checked"{/if} />
|
||||
{else}
|
||||
<div class="multishop_product_checkbox">
|
||||
<input type="checkbox" name="multishop_check[{$field}]" value="1" onclick="multishopCheckProductField(this.checked, '{$field}', '{$type}')" {if !empty($multishop_check[$field])}checked="checked"{/if} />
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
@@ -106,18 +106,27 @@ jQuery(document).ready(Customer.init);
|
||||
<div class="hint" style="display:block;min-height:0;">
|
||||
{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="Price"}
|
||||
|
||||
<div class="separation"></div>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Pre-tax wholesale price:'}</label></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"}
|
||||
<label>{l s='Pre-tax wholesale price:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" type="text" value="{$product->wholesale_price|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
|
||||
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{$product->wholesale_price|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
|
||||
<p class="preference_description">{l s='The wholesale price at which you bought this product'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Pre-tax retail price:'}</label></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}
|
||||
<label>{l s='Pre-tax retail price:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input type="hidden" id="priceTEReal" name="price" value="{$product->price}" />
|
||||
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{$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();" />{$currency->suffix}
|
||||
@@ -125,7 +134,10 @@ jQuery(document).ready(Customer.init);
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Tax rule:'}</label></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"}
|
||||
<label>{l s='Tax rule:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<script type="text/javascript">
|
||||
noTax = {if $tax_exclude_taxe_option}true{else}false{/if};
|
||||
@@ -177,7 +189,10 @@ jQuery(document).ready(Customer.init);
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_unit_price">
|
||||
<td class="col-left"><label>{l s='Unit price:'}</label></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"}
|
||||
<label>{l s='Unit price:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
{$currency->prefix} <input size="11" 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');"/>{$currency->suffix}
|
||||
@@ -197,7 +212,10 @@ jQuery(document).ready(Customer.init);
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label> </label></td>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"}
|
||||
<label> </label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="on_sale" id="on_sale" style="padding-top: 5px;" {if $product->on_sale}checked="checked"{/if} value="1" /> <label for="on_sale" class="t">{l s='Display "on sale" icon on product page and text on product listing'}</label>
|
||||
</td>
|
||||
|
||||
@@ -26,11 +26,15 @@
|
||||
|
||||
<input type="hidden" name="submitted_tabs[]" value="Seo" />
|
||||
<h4>{l s='SEO'}</h4>
|
||||
|
||||
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Seo"}
|
||||
|
||||
<div class="separation"></div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"}
|
||||
<label>{l s='Meta title:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
@@ -43,6 +47,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="meta_description" type="default" multilang="true"}
|
||||
<label>{l s='Meta description:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
@@ -56,6 +61,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="meta_keywords" type="default" multilang="true"}
|
||||
<label>{l s='Meta keywords:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
@@ -67,6 +73,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="link_rewrite" type="default" multilang="true"}
|
||||
<label>{l s='Friendly URL:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
@@ -84,5 +91,3 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@@ -28,31 +28,35 @@
|
||||
<h4 class="tab">1. {l s='Info.'}</h4>
|
||||
<h4>{l s='Shipping'}</h4>
|
||||
|
||||
{if isset($display_common_field) && $display_common_field}
|
||||
<div class="hint" 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}
|
||||
|
||||
<div class="separation"></div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Width (package):'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="6" maxlength="6" name="width" type="text" value="{$product->width}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" /> {$ps_dimension_unit}
|
||||
<input size="6" maxlength="6" name="width" type="text" value="{$product->width}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />{$bullet_common_field} {$ps_dimension_unit}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Height (package):'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="6" maxlength="6" name="height" type="text" value="{$product->height}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" /> {$ps_dimension_unit}
|
||||
<input size="6" maxlength="6" name="height" type="text" value="{$product->height}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />{$bullet_common_field} {$ps_dimension_unit}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Depth (package):'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="6" maxlength="6" name="depth" type="text" value="{$product->depth}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" /> {$ps_dimension_unit}
|
||||
<input size="6" maxlength="6" name="depth" type="text" value="{$product->depth}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />{$bullet_common_field} {$ps_dimension_unit}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Weight (package):'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="6" maxlength="6" name="weight" type="text" value="{$product->weight}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" /> {$ps_weight_unit}
|
||||
<input size="6" maxlength="6" name="weight" type="text" value="{$product->weight}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />{$bullet_common_field} {$ps_weight_unit}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
{block name="label"}
|
||||
{if $input.type == 'text' && $input.name == 'name'}
|
||||
<div class="hint" name="help_box" style="display:block;">{l s='You can\'t change the GroupShop when you have more than one Shop'}</div><br />
|
||||
<div class="hint" name="help_box" style="display:block;">{l s='You can\'t change the shop group when you have more than one Shop'}</div><br />
|
||||
{/if}
|
||||
{$smarty.block.parent}
|
||||
{/block}
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="clear"> </div>
|
||||
{elseif $input.type == 'textGroupShop'}
|
||||
{elseif $input.type == 'textShopGroup'}
|
||||
{$input.value}
|
||||
{else}
|
||||
{if $input.type == 'select' && $input.name == 'id_category'}
|
||||
|
||||
+2
-48
@@ -67,57 +67,11 @@
|
||||
{block name="label"}
|
||||
|
||||
{if $input.type == 'text' && $input.name == 'name'}
|
||||
<div class="hint" name="help_box" style="display:block;">{l s='You can\'t edit GroupShop when you have more than one shop'}</div><br />
|
||||
<div class="hint" name="help_box" style="display:block;">{l s='You can\'t edit the shop group when you have more than one shop'}</div><br />
|
||||
{/if}
|
||||
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="other_fieldsets"}
|
||||
{if isset($form_import)}
|
||||
<br /><br />
|
||||
<fieldset>
|
||||
{foreach $form_import as $key => $field}
|
||||
{if $key == 'legend'}
|
||||
<legend>
|
||||
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title}" />{/if}
|
||||
{$field.title}
|
||||
</legend>
|
||||
{elseif $key == 'label'}
|
||||
<label>{$field}</label>
|
||||
{/if}
|
||||
<div class="clear"></div>
|
||||
{if $key == 'checkbox'}
|
||||
<div class="margin-form">
|
||||
<label><input type="{$field.type}" value="{$field.value}" name="{$field.name}" id="{$field.name}" {if $checked} checked="checked"{/if}/> {$field.label}</label>
|
||||
{elseif $key == 'select'}
|
||||
<select name="{$field.name}" id="{$field.name}">
|
||||
{foreach $field.options.query AS $key => $option}
|
||||
<option value="{$key}" {if $key == $defaultGroup}selected="selected"{/if}>
|
||||
{$option.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{elseif $key == 'allcheckbox'}
|
||||
<div id="importList" {if !$checked}style="display:none"{/if}>
|
||||
<ul>
|
||||
{foreach $field.values as $key => $label}
|
||||
<li><label><input type="checkbox" name="importData[{$key}]" checked="checked" /> {$label}</label></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{elseif $key == 'p'}
|
||||
<p>{$field}</p>
|
||||
</div>
|
||||
{elseif $key == 'submit'}
|
||||
<div class="margin-form">
|
||||
<input type="submit" value="{$field.title}" name="submitAdd{$table}" {if isset($field.class)}class="{$field.class}"{/if} />
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</fieldset>
|
||||
{/if}
|
||||
{/block}
|
||||
{/block}
|
||||
@@ -221,7 +221,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $display_header && $is_multishop && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
|
||||
{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
|
||||
<div class="multishop_toolbar">
|
||||
<span class="text_multishop">{l s='Multishop configuration for'}</span>
|
||||
{$shop_list}
|
||||
|
||||
@@ -29,30 +29,30 @@ $().ready(function() {
|
||||
// Click on "all shop"
|
||||
$('.input_all_shop').live('click', function() {
|
||||
var checked = $(this).attr('checked');
|
||||
$('.input_group_shop:not(:disabled)').attr('checked', checked);
|
||||
$('.input_shop_group:not(:disabled)').attr('checked', checked);
|
||||
$('.input_shop:not(:disabled)').attr('checked', checked);
|
||||
});
|
||||
|
||||
// Click on a group shop
|
||||
$('.input_group_shop').live('click', function() {
|
||||
$('.input_shop_group').live('click', function() {
|
||||
$('.input_shop[value='+$(this).val()+']').attr('checked', $(this).attr('checked'));
|
||||
check_all_shop();
|
||||
});
|
||||
|
||||
// Click on a shop
|
||||
$('.input_shop').live('click', function() {
|
||||
check_group_shop_status($(this).val());
|
||||
check_shop_group_status($(this).val());
|
||||
check_all_shop();
|
||||
});
|
||||
|
||||
// Initialize checkbox
|
||||
$('.input_group_shop').each(function(k, v) {
|
||||
check_group_shop_status($(v).val());
|
||||
$('.input_shop_group').each(function(k, v) {
|
||||
check_shop_group_status($(v).val());
|
||||
check_all_shop();
|
||||
});
|
||||
});
|
||||
|
||||
function check_group_shop_status(id_group) {
|
||||
function check_shop_group_status(id_group) {
|
||||
var groupChecked = true;
|
||||
var total = 0;
|
||||
$('.input_shop[value='+id_group+']').each(function(k, v) {
|
||||
@@ -62,12 +62,12 @@ function check_group_shop_status(id_group) {
|
||||
});
|
||||
|
||||
if (total > 0)
|
||||
$('.input_group_shop[value='+id_group+']').attr('checked', groupChecked);
|
||||
$('.input_shop_group[value='+id_group+']').attr('checked', groupChecked);
|
||||
}
|
||||
|
||||
function check_all_shop() {
|
||||
var allChecked = true;
|
||||
$('.input_group_shop:not(:disabled)').each(function(k, v) {
|
||||
$('.input_shop_group:not(:disabled)').each(function(k, v) {
|
||||
if (!$(v).attr('checked'))
|
||||
allChecked = false;
|
||||
});
|
||||
@@ -78,26 +78,22 @@ function check_all_shop() {
|
||||
<div class="assoShop">
|
||||
<table class="table" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>{if $input.type == 'group_shop'}{l s='Group shop'}{else}{l s='Shop'}{/if}</th>
|
||||
<th>{l s='Shop'}</th>
|
||||
</tr>
|
||||
<tr {if $input.type == 'group_shop'}class="alt_row"{/if}>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="t"><input class="input_all_shop" type="checkbox" /> <b>{if $input.type == 'group_shop'}{l s='All group shops'}{else}{l s='All shops'}{/if}</b></label>
|
||||
<label class="t"><input class="input_all_shop" type="checkbox" /> <b>{l s='All shops'}</b></label>
|
||||
</td>
|
||||
</tr>
|
||||
{foreach $input.values as $groupID => $groupData}
|
||||
{if ($input.type == 'group_shop' && isset($fields_value.shop[$groupID]))}
|
||||
{assign var=groupChecked value=true}
|
||||
{else}
|
||||
{assign var=groupChecked value=false}
|
||||
{/if}
|
||||
<tr {if $input.type == 'shop'}class="alt_row"{/if}>
|
||||
<td>
|
||||
<img style="vertical-align:middle;" alt="" src="../img/admin/lv2_b.gif" />
|
||||
<label class="t">
|
||||
<input class="input_group_shop"
|
||||
<input class="input_shop_group"
|
||||
type="checkbox"
|
||||
name="checkBoxGroupShopAsso_{$table}[{$form_id}][{$groupID}]"
|
||||
name="checkBoxShopGroupAsso_{$table}[{$form_id}][{$groupID}]"
|
||||
value="{$groupID}"
|
||||
{if $groupChecked} checked="checked"{/if} />
|
||||
<b>{l s='Group:'} {$groupData['name']}</b>
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
{elseif $input.type == 'group'}
|
||||
{assign var=groups value=$input.values}
|
||||
{include file='helpers/form/form_group.tpl'}
|
||||
{elseif $input.type == 'shop' OR $input.type == 'group_shop'}
|
||||
{elseif $input.type == 'shop'}
|
||||
{$input.html}
|
||||
{elseif $input.type == 'categories'}
|
||||
{include file='helpers/form/form_category.tpl' categories=$input.values}
|
||||
|
||||
@@ -58,11 +58,21 @@
|
||||
<p>{$categoryData['info']}</p>
|
||||
{/if}
|
||||
|
||||
{if $use_multishop}
|
||||
<input type="checkbox" style="vertical-align: text-top" checked="checked" onclick="checkAllMultishopDefaultValue(this)" /> <b>{l s='Uncheck / check all'}</b> {l s='(uncheck boxes if you want to set a custom value for this shop or group shop context)'}
|
||||
<div class="separation"></div>
|
||||
{/if}
|
||||
|
||||
{foreach $categoryData['fields'] AS $key => $field}
|
||||
{if $field['type'] == 'hidden'}
|
||||
<input type="hidden" name="{$key}" value="{$field['value']}" />
|
||||
{else}
|
||||
<div style="clear: both; padding-top:15px;" id="conf_id_{$key}" {if $field['is_invisible']} class="isInvisible"{/if}>
|
||||
{if ($field['multishop_default'])}
|
||||
<div class="preference_default_multishop">
|
||||
<input type="checkbox" name="configUseDefault[{$key}]" value="1" {if $field['is_disabled']} checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" />
|
||||
</div>
|
||||
{/if}
|
||||
{block name="label"}
|
||||
{if isset($field['title'])}
|
||||
<label class="conf_title">
|
||||
@@ -170,13 +180,6 @@
|
||||
{/if}
|
||||
{if isset($field['hint'])}<span class="hint" name="help_box">{$field['hint']}<span class="hint-pointer"> </span></span>{/if}
|
||||
{/block}{* end block input *}
|
||||
{if ($field['multishop_default'])}
|
||||
<div class="preference_default_multishop">
|
||||
<label>
|
||||
<input type="checkbox" name="configUseDefault[{$key}]" value="1" {if $field['is_disabled']} checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" /> {l s='Use default value'}
|
||||
</label>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($field['desc'])}<p class="preference_description">{$field['desc']}</p>{/if}
|
||||
{if $field['is_invisible']}<p class="warn">{l s='You can\'t change the value of this configuration field in the context of this shop'}</p>{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user