// Add hooks for shop duplication, fix homeslider duplication #PSTEST-1173

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14864 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-04-25 09:04:38 +00:00
parent f73397db89
commit 64b83ee40e
4 changed files with 29 additions and 7 deletions
+10 -4
View File
@@ -796,11 +796,17 @@ class ShopCore extends ObjectModel
Db::getInstance()->execute($sql);
}
}
/*else
{
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.$table_name.'` SET WHERE `'.$id.'`='.(int)$old_id);
}*/
}
// Hook for duplication of shop data
$modules_list = Hook::getHookModuleExecList('actionShopDataDuplication');
if (is_array($modules_list) && count($modules_list) > 0)
foreach ($modules_list as $m)
if (!$tables_import || isset($tables_import['Module'.ucfirst($m['module'])]))
Hook::exec('actionShopDataDuplication', array(
'old_id_shop' => (int)$old_id,
'new_id_shop' => (int)$this->id,
), $m['id_module']);
}
public function checkIfShopExist($id)