remove json lib. depriciate Tools::json function use php function
This commit is contained in:
@@ -36,7 +36,7 @@ class AdminShopControllerCore extends AdminController
|
||||
$this->table = 'shop';
|
||||
$this->className = 'Shop';
|
||||
$this->multishop_context = Shop::CONTEXT_ALL;
|
||||
|
||||
|
||||
$this->id_shop_group = (int)Tools::getValue('id_shop_group');
|
||||
|
||||
/* if $_GET['id_shop'] is transmitted, virtual url can be loaded in config.php, so we wether transmit shop_id in herfs */
|
||||
@@ -250,7 +250,7 @@ class AdminShopControllerCore extends AdminController
|
||||
elseif (Shop::getTotalShops() == 1)
|
||||
$this->errors[] = Tools::displayError('You cannot disable the last shop.');
|
||||
}*/
|
||||
|
||||
|
||||
if (Tools::isSubmit('submitAddshopAndStay') || Tools::isSubmit('submitAddshop')) {
|
||||
$shop_group = new ShopGroup((int)Tools::getValue('id_shop_group'));
|
||||
if ($shop_group->shopNameExists(Tools::getValue('name'), (int)Tools::getValue('id_shop'))) {
|
||||
@@ -475,7 +475,7 @@ class AdminShopControllerCore extends AdminController
|
||||
$root_category = new Category($root_categories[0]['id_category']);
|
||||
$children = $root_category->getAllChildren($this->context->language->id);
|
||||
$selected_cat[] = $root_categories[0]['id_category'];
|
||||
|
||||
|
||||
foreach ($children as $child) {
|
||||
$selected_cat[] = $child->id;
|
||||
}
|
||||
@@ -576,7 +576,7 @@ class AdminShopControllerCore extends AdminController
|
||||
'zone' => $this->l('Zones'),
|
||||
'cart_rule' => $this->l('Cart rules'),
|
||||
);
|
||||
|
||||
|
||||
// Hook for duplication of shop data
|
||||
$modules_list = Hook::getHookModuleExecList('actionShopDataDuplication');
|
||||
if (is_array($modules_list) && count($modules_list) > 0) {
|
||||
@@ -586,7 +586,7 @@ class AdminShopControllerCore extends AdminController
|
||||
}
|
||||
|
||||
asort($import_data);
|
||||
|
||||
|
||||
if (!$this->object->id) {
|
||||
$this->fields_import_form = array(
|
||||
'radio' => array(
|
||||
@@ -653,7 +653,7 @@ class AdminShopControllerCore extends AdminController
|
||||
if (Tools::isSubmit('id_category_default')) {
|
||||
$_POST['id_category'] = (int)Tools::getValue('id_category_default');
|
||||
}
|
||||
|
||||
|
||||
/* Checking fields validity */
|
||||
$this->validateRules();
|
||||
|
||||
@@ -711,13 +711,13 @@ class AdminShopControllerCore extends AdminController
|
||||
if (!array_key_exists('Edit', self::$cache_lang)) {
|
||||
self::$cache_lang['Edit'] = $this->l('Edit', 'Helper');
|
||||
}
|
||||
|
||||
|
||||
$tpl->assign(array(
|
||||
'href' => $this->context->link->getAdminLink('AdminShop').'&shop_id='.(int)$id.'&update'.$this->table,
|
||||
'action' => self::$cache_lang['Edit'],
|
||||
'id' => $id
|
||||
));
|
||||
|
||||
|
||||
return $tpl->fetch();
|
||||
} else {
|
||||
return;
|
||||
@@ -738,7 +738,7 @@ class AdminShopControllerCore extends AdminController
|
||||
$root_category = new Category($root_categories[0]['id_category']);
|
||||
$children = $root_category->getAllChildren($this->context->language->id);
|
||||
$selected_cat[] = $root_categories[0]['id_category'];
|
||||
|
||||
|
||||
foreach ($children as $child) {
|
||||
$selected_cat[] = $child->id;
|
||||
}
|
||||
@@ -860,6 +860,6 @@ class AdminShopControllerCore extends AdminController
|
||||
'children' => $tree,
|
||||
));
|
||||
|
||||
die(Tools::jsonEncode($tree));
|
||||
die(json_encode($tree));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user