// Fixed sql error that occurred in the module duplication when you add a new shop in multishop

This commit is contained in:
dMetzger
2012-08-22 08:58:38 +00:00
parent 82367c3680
commit 1926c4c405
2 changed files with 8 additions and 10 deletions
+4 -5
View File
@@ -741,10 +741,9 @@ class BlockCms extends Module
public function hookActionShopDataDuplication($params)
{
Db::getInstance()->execute('
INSERT INTO '._DB_PREFIX_.'cms_block_shop (id_cms_block, id_shop)
SELECT id_cms_block, '.(int)$params['new_id_shop'].'
FROM '._DB_PREFIX_.'cms_block_shop
WHERE id_shop = '.(int)$params['old_id_shop'].'
');
INSERT IGNORE INTO '._DB_PREFIX_.'cms_block_shop (id_cms_block, id_shop)
SELECT id_cms_block, '.(int)$params['new_id_shop'].'
FROM '._DB_PREFIX_.'cms_block_shop
WHERE id_shop = '.(int)$params['old_id_shop']);
}
}