remove json lib. depriciate Tools::json function use php function
This commit is contained in:
@@ -140,7 +140,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
}
|
||||
echo Tools::jsonEncode(array('html' => $html, 'next_link' => $next_link));
|
||||
echo json_encode(array('html' => $html, 'next_link' => $next_link));
|
||||
}
|
||||
|
||||
public function setMedia()
|
||||
@@ -589,7 +589,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
)
|
||||
ORDER BY c.`firstname`, c.`lastname` ASC
|
||||
LIMIT 50');
|
||||
die(Tools::jsonEncode($customers));
|
||||
die(json_encode($customers));
|
||||
}
|
||||
// Both product filter (free product and product discount) search for products
|
||||
if (Tools::isSubmit('giftProductFilter') || Tools::isSubmit('reductionProductFilter')) {
|
||||
@@ -599,7 +599,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
$products,
|
||||
$this->context->employee->id_profile
|
||||
);
|
||||
die(Tools::jsonEncode($products));
|
||||
die(json_encode($products));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
public function ajaxProcessSearchProducts()
|
||||
{
|
||||
$array = $this->searchProducts(Tools::getValue('product_search'));
|
||||
$this->content = trim(Tools::jsonEncode($array));
|
||||
$this->content = trim(json_encode($array));
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
@@ -771,6 +771,6 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
if ($vouchers = CartRule::getCartsRuleByCode(Tools::getValue('q'), (int)$this->context->language->id, true)) {
|
||||
$found = true;
|
||||
}
|
||||
echo Tools::jsonEncode(array('found' => $found, 'vouchers' => $vouchers));
|
||||
echo json_encode(array('found' => $found, 'vouchers' => $vouchers));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user