[-] MO : #PSCFV-2437 : Bug fix adding block using multishop

This commit is contained in:
Francois Gaillard
2012-05-29 07:51:42 +00:00
parent 45b47e0f8e
commit 9a62279202
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -119,6 +119,7 @@ class BlockCMSModel extends ObjectModel
{
$sql = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_shop` (
`id_cms_block` int(10) unsigned NOT NULL auto_increment,
`id_group_shop` int(10) unsigned NOT NULL,
`id_shop` int(10) unsigned NOT NULL,
PRIMARY KEY (`id_cms_block`, `id_shop`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8';
@@ -157,10 +158,10 @@ class BlockCMSModel extends ObjectModel
return Db::getInstance()->Insert_ID();
}
public static function insertCMSBlockShop($id_cms_block, $id_shop)
public static function insertCMSBlockShop($id_cms_block, $id_group_shop, $id_shop)
{
$sql = 'INSERT INTO `'._DB_PREFIX_.'cms_block_shop` (`id_cms_block`, `id_shop`)
VALUES('.(int)$id_cms_block.', '.(int)$id_shop.')';
$sql = 'INSERT INTO `'._DB_PREFIX_.'cms_block_shop` (`id_cms_block`, `id_group_shop`, `id_shop`)
VALUES('.(int)$id_cms_block.', '.(int)$id_group_shop.', '.(int)$id_shop.')';
Db::getInstance()->execute($sql);