[-] BO : #PSCFV-3366 - Not possible to create customizable fields on multishop context
This commit is contained in:
1 parent
465097d075
commit
202728403c
3 files changed
+22
-3
No files matched your search
@@ -28,17 +28,24 @@
|
|||||||
<input type="hidden" name="submitted_tabs[]" value="Customization" />
|
<input type="hidden" name="submitted_tabs[]" value="Customization" />
|
||||||
<h4>{l s='Add or modify customizable properties'}</h4>
|
<h4>{l s='Add or modify customizable properties'}</h4>
|
||||||
|
|
||||||
|
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"}
|
||||||
<div class="separation"></div><br />
|
<div class="separation"></div><br />
|
||||||
<table cellpadding="5" style="width:100%">
|
<table cellpadding="5" style="width:100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">{l s='File fields:'}</td>
|
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">
|
||||||
|
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
|
||||||
|
<label>{l s='File fields:'}</label>
|
||||||
|
</td>
|
||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
<input type="text" name="uploadable_files" id="uploadable_files" size="4" value="{$uploadable_files|htmlentities}" />
|
<input type="text" name="uploadable_files" id="uploadable_files" size="4" value="{$uploadable_files|htmlentities}" />
|
||||||
<p class="preference_description">{l s='Number of upload file fields displayed'}</p>
|
<p class="preference_description">{l s='Number of upload file fields displayed'}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">{l s='Text fields:'}</td>
|
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">
|
||||||
|
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
|
||||||
|
<label>{l s='Text fields:'}</label>
|
||||||
|
</td>
|
||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
<input type="text" name="text_fields" id="text_fields" size="4" value="{$text_fields|htmlentities}" />
|
<input type="text" name="text_fields" id="text_fields" size="4" value="{$text_fields|htmlentities}" />
|
||||||
<p class="preference_description">{l s='Number of text fields displayed'}</p>
|
<p class="preference_description">{l s='Number of text fields displayed'}</p>
|
||||||
|
|||||||
+1
-1
@@ -247,7 +247,6 @@ class ProductCore extends ObjectModel
|
|||||||
'depth' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
'depth' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
||||||
'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
||||||
'quantity_discount' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
'quantity_discount' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||||
'uploadable_files' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
|
||||||
'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13),
|
'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13),
|
||||||
'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc', 'size' => 12),
|
'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc', 'size' => 12),
|
||||||
'cache_is_pack' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
'cache_is_pack' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||||
@@ -268,6 +267,7 @@ class ProductCore extends ObjectModel
|
|||||||
'additional_shipping_cost' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'),
|
'additional_shipping_cost' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'),
|
||||||
'customizable' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
'customizable' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
||||||
'text_fields' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
'text_fields' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
||||||
|
'uploadable_files' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
||||||
'active' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
'active' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
||||||
'available_for_order' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
'available_for_order' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
||||||
'available_date' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'),
|
'available_date' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'),
|
||||||
|
|||||||
@@ -27,6 +27,12 @@
|
|||||||
// The ProductTabsManager instance will make sure the onReady() methods of each tabs are executed once the tab has loaded
|
// The ProductTabsManager instance will make sure the onReady() methods of each tabs are executed once the tab has loaded
|
||||||
var product_tabs = [];
|
var product_tabs = [];
|
||||||
|
|
||||||
|
product_tabs['Customization'] = new function(){
|
||||||
|
this.onReady = function(){
|
||||||
|
if (display_multishop_checkboxes)
|
||||||
|
ProductMultishop.checkAllCustomization();
|
||||||
|
}
|
||||||
|
}
|
||||||
product_tabs['Combinations'] = new function(){
|
product_tabs['Combinations'] = new function(){
|
||||||
var self = this;
|
var self = this;
|
||||||
this.bindEdit = function(){
|
this.bindEdit = function(){
|
||||||
@@ -1543,6 +1549,12 @@ var ProductMultishop = new function()
|
|||||||
ProductMultishop.checkField($('input[name=\'multishop_check[id_category_default]\']').prop('checked'), 'categories-treeview', 'category_box');
|
ProductMultishop.checkField($('input[name=\'multishop_check[id_category_default]\']').prop('checked'), 'categories-treeview', 'category_box');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.checkAllCustomization = function()
|
||||||
|
{
|
||||||
|
ProductMultishop.checkField($('input[name=\'multishop_check[uploadable_files]\']').prop('checked'), 'uploadable_files');
|
||||||
|
ProductMultishop.checkField($('input[name=\'multishop_check[text_fields]\']').prop('checked'), 'text_fields');
|
||||||
|
};
|
||||||
|
|
||||||
this.checkAllCombinations = function()
|
this.checkAllCombinations = function()
|
||||||
{
|
{
|
||||||
ProductMultishop.checkField($('input[name=\'multishop_check[attribute_wholesale_price]\']').prop('checked'), 'attribute_wholesale_price');
|
ProductMultishop.checkField($('input[name=\'multishop_check[attribute_wholesale_price]\']').prop('checked'), 'attribute_wholesale_price');
|
||||||
|
|||||||
Reference in new issue
Block a user