remove json lib. depriciate Tools::json function use php function

This commit is contained in:
shreesh arora
2021-03-05 19:35:08 +05:30
parent 82b30db256
commit 659d5b312f
94 changed files with 381 additions and 1248 deletions

View File

@@ -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));
}
}