// Fixed sql error that occurred in the module duplication when you add a new shop in multishop
This commit is contained in:
@@ -741,10 +741,9 @@ class BlockCms extends Module
|
|||||||
public function hookActionShopDataDuplication($params)
|
public function hookActionShopDataDuplication($params)
|
||||||
{
|
{
|
||||||
Db::getInstance()->execute('
|
Db::getInstance()->execute('
|
||||||
INSERT INTO '._DB_PREFIX_.'cms_block_shop (id_cms_block, id_shop)
|
INSERT IGNORE INTO '._DB_PREFIX_.'cms_block_shop (id_cms_block, id_shop)
|
||||||
SELECT id_cms_block, '.(int)$params['new_id_shop'].'
|
SELECT id_cms_block, '.(int)$params['new_id_shop'].'
|
||||||
FROM '._DB_PREFIX_.'cms_block_shop
|
FROM '._DB_PREFIX_.'cms_block_shop
|
||||||
WHERE id_shop = '.(int)$params['old_id_shop'].'
|
WHERE id_shop = '.(int)$params['old_id_shop']);
|
||||||
');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -657,11 +657,10 @@ class HomeSlider extends Module
|
|||||||
public function hookActionShopDataDuplication($params)
|
public function hookActionShopDataDuplication($params)
|
||||||
{
|
{
|
||||||
Db::getInstance()->execute('
|
Db::getInstance()->execute('
|
||||||
INSERT INTO '._DB_PREFIX_.'homeslider (id_homeslider_slides, id_shop)
|
INSERT IGNORE INTO '._DB_PREFIX_.'homeslider (id_homeslider_slides, id_shop)
|
||||||
SELECT id_homeslider_slides, '.(int)$params['new_id_shop'].'
|
SELECT id_homeslider_slides, '.(int)$params['new_id_shop'].'
|
||||||
FROM '._DB_PREFIX_.'homeslider
|
FROM '._DB_PREFIX_.'homeslider
|
||||||
WHERE id_shop = '.(int)$params['old_id_shop'].'
|
WHERE id_shop = '.(int)$params['old_id_shop']);
|
||||||
');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function headerHTML()
|
public function headerHTML()
|
||||||
|
|||||||
Reference in New Issue
Block a user