// Fix attributes values form page for multishop #PSTEST-780
This commit is contained in:
1 parent
93330e7b86
commit
8e9b4e6ee6
2 files changed
+5
-4
No files matched your search
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
var attributesGroups = {ldelim}{$strAttributesGroups}{rdelim};
|
var attributesGroups = {ldelim}{$strAttributesGroups}{rdelim};
|
||||||
|
|
||||||
var displayColorFieldsOption = function() {
|
var displayColorFieldsOption = function() {
|
||||||
var val = $('#id_attribute_group').val();
|
var val = $('#id_attribute_group').val();
|
||||||
if (attributesGroups[val])
|
if (attributesGroups[val])
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
$('.input_group_shop').each(function(k, item)
|
$('.input_group_shop').each(function(k, item)
|
||||||
{
|
{
|
||||||
var id_group_shop = $(item).val();
|
var id_group_shop = $(item).val();
|
||||||
if (shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_group_shop, shop_associations[id_attribute_group]) > -1)
|
if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_group_shop, shop_associations[id_attribute_group]) > -1)
|
||||||
$(item).attr('disabled', false);
|
$(item).attr('disabled', false);
|
||||||
else
|
else
|
||||||
$(item).attr('disabled', true);
|
$(item).attr('disabled', true);
|
||||||
|
|||||||
@@ -294,7 +294,6 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
$associations = array();
|
$associations = array();
|
||||||
foreach (Db::getInstance()->executeS($sql) as $row)
|
foreach (Db::getInstance()->executeS($sql) as $row)
|
||||||
$associations[$row['id_attribute_group']][] = $row['id_group_shop'];
|
$associations[$row['id_attribute_group']][] = $row['id_group_shop'];
|
||||||
$this->fields_form['shop_associations'] = Tools::jsonEncode($associations);
|
|
||||||
|
|
||||||
$this->fields_form['input'][] = array(
|
$this->fields_form['input'][] = array(
|
||||||
'type' => 'group_shop',
|
'type' => 'group_shop',
|
||||||
@@ -303,8 +302,10 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
'values' => Shop::getTree()
|
'values' => Shop::getTree()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
$associations = array();
|
||||||
|
|
||||||
$this->fields_form['shop_associations'] = Tools::jsonEncode(array());
|
$this->fields_form['shop_associations'] = Tools::jsonEncode($associations);
|
||||||
$this->fields_form['input'][] = array(
|
$this->fields_form['input'][] = array(
|
||||||
'type' => 'color',
|
'type' => 'color',
|
||||||
'label' => $this->l('Color:'),
|
'label' => $this->l('Color:'),
|
||||||
|
|||||||
Reference in new issue
Block a user