// Fix attribute values creation in multishop #PSCFV-2313
This commit is contained in:
@@ -69,10 +69,10 @@
|
|||||||
var changeAssociationGroup = function()
|
var changeAssociationGroup = function()
|
||||||
{
|
{
|
||||||
var id_attribute_group = $('#id_attribute_group').val();
|
var id_attribute_group = $('#id_attribute_group').val();
|
||||||
$('.input_shop_group').each(function(k, item)
|
$('.input_shop').each(function(k, item)
|
||||||
{
|
{
|
||||||
var id_shop_group = $(item).val();
|
var id_shop = $(item).val();
|
||||||
if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_shop_group, shop_associations[id_attribute_group]) > -1)
|
if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_shop, shop_associations[id_attribute_group]) > -1)
|
||||||
$(item).attr('disabled', false);
|
$(item).attr('disabled', false);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ function check_all_shop() {
|
|||||||
<label class="child">
|
<label class="child">
|
||||||
<input class="input_shop"
|
<input class="input_shop"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
value="{$groupID}"
|
value="{$shopID}"
|
||||||
name="checkBoxShopAsso_{$table}[{$form_id}][{$shopID}]"
|
name="checkBoxShopAsso_{$table}[{$form_id}][{$shopID}]"
|
||||||
id="checkedBox_{$shopID}"
|
id="checkedBox_{$shopID}"
|
||||||
{if $checked} checked="checked"{/if} />
|
{if $checked} checked="checked"{/if} />
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
$sql = 'SELECT id_attribute_group, id_shop FROM '._DB_PREFIX_.'attribute_group_shop';
|
$sql = 'SELECT id_attribute_group, id_shop FROM '._DB_PREFIX_.'attribute_group_shop';
|
||||||
$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_shop_group'];
|
$associations[$row['id_attribute_group']][] = $row['id_shop'];
|
||||||
|
|
||||||
$this->fields_form['input'][] = array(
|
$this->fields_form['input'][] = array(
|
||||||
'type' => 'shop',
|
'type' => 'shop',
|
||||||
@@ -306,6 +306,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
$associations = array();
|
$associations = array();
|
||||||
|
|
||||||
$this->fields_form['shop_associations'] = Tools::jsonEncode($associations);
|
$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