// Context part 29
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7935 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -44,8 +44,6 @@ require(dirname(__FILE__).'/classes/MRGetTickets.php');
|
||||
require(dirname(__FILE__).'/classes/MRGetRelayPoint.php');
|
||||
require(dirname(__FILE__).'/classes/MRManagement.php');
|
||||
|
||||
global $cookie, $cart, $customer;
|
||||
|
||||
$method = Tools::getValue('method');
|
||||
$params = array();
|
||||
$result = array();
|
||||
@@ -70,13 +68,13 @@ switch($method)
|
||||
break;
|
||||
case 'MRGetRelayPoint':
|
||||
$params['id_carrier'] = Tools::getValue('id_carrier');
|
||||
$params['weight'] = $cart->getTotalWeight();
|
||||
$params['id_address_delivery'] = $cart->id_address_delivery;
|
||||
$params['weight'] = Context::getContext()->cart->getTotalWeight();
|
||||
$params['id_address_delivery'] = Context::getContext()->cart->id_address_delivery;
|
||||
break;
|
||||
case 'addSelectedCarrierToDB':
|
||||
$params['id_carrier'] = Tools::getValue('id_carrier');
|
||||
$params['id_cart'] = $cart->id;
|
||||
$params['id_customer'] = $cookie->id_customer;
|
||||
$params['id_cart'] = Context::getContext()->cart->id;
|
||||
$params['id_customer'] = Context::getContext()->customer->id;
|
||||
$params['id_mr_method'] = Tools::getValue('id_mr_method');
|
||||
$params['relayPointInfo'] = Tools::getValue('relayPointInfo');
|
||||
break;
|
||||
|
||||
@@ -404,8 +404,6 @@ class MRCreateTickets implements IMondialRelayWSMethod
|
||||
*/
|
||||
private function _updateTable($params, $expeditionNum, $ticketURL, $trackingURL, $id_mr_selected)
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
UPDATE `'._DB_PREFIX_.'mr_selected`
|
||||
SET `MR_poids` = \''.$params['Poids'].'\',
|
||||
@@ -426,7 +424,7 @@ class MRCreateTickets implements IMondialRelayWSMethod
|
||||
$history = new OrderHistory();
|
||||
$history->id_order = (int)($params['NDossier']);
|
||||
$history->changeIdOrderState(Configuration::get('PS_OS_SHIPPING'), (int)($params['NDossier']));
|
||||
$history->id_employee = (int)($cookie->id_employee);
|
||||
$history->id_employee = (int)Context::getContext()->employee->id;
|
||||
$history->addWithemail(true, $templateVars);
|
||||
|
||||
unset($order);
|
||||
|
||||
@@ -551,10 +551,6 @@ class MondialRelay extends Module
|
||||
*/
|
||||
public function _getCarriers()
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
$id_lang = (int)$cookie->id_lang;
|
||||
|
||||
// Query don't use the external_module_name to keep the
|
||||
// 1.3 compatibility
|
||||
$carriers = Db::getInstance()->ExecuteS('
|
||||
@@ -625,8 +621,6 @@ class MondialRelay extends Module
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
$error = null;
|
||||
|
||||
$html = '';
|
||||
|
||||
Reference in New Issue
Block a user