From ad3e1f18048c5fbf7ce1896deee1319eefc321c4 Mon Sep 17 00:00:00 2001 From: rMalie Date: Thu, 28 Jul 2011 13:53:51 +0000 Subject: [PATCH] // Fix #PSFV-31 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7788 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Carrier.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/Carrier.php b/classes/Carrier.php index 0abc54c19..a1fb3d46d 100644 --- a/classes/Carrier.php +++ b/classes/Carrier.php @@ -401,12 +401,14 @@ class CarrierCore extends ObjectModel public static function getCarriersForOrder($id_zone, $groups = NULL, Cart $cart = null, $id_currency = null, $id_lang = null) { + $context = Context::getContext(); if (!$id_lang) - $id_lang = Context::getContext()->language->id; + $id_lang = $context->language->id; if (!$cart) - $cart = Context::getContext()->cart; + $cart = $context->cart; if (!$id_currency) - $id_currency = Context::getContext()->currency->id; + $id_currency = $context->currency->id; + if (is_array($groups) AND !empty($groups)) $result = Carrier::getCarriers($id_lang, true, false, (int)$id_zone, $groups, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); else