[-] BO : #PSCFV-3066 - Fix bug on selecting delivery option

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16238 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-07-05 13:20:38 +00:00
parent fd36dd7130
commit 923216dfa4
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -2238,10 +2238,10 @@ class CartCore extends ObjectModel
* Get the delivery option seleted, or if no delivery option was selected, the cheapest option for each address
* @return array delivery option
*/
public function getDeliveryOption($default_country = null, $dontAutoSeletectOptions = false)
public function getDeliveryOption($default_country = null, $dontAutoSeletectOptions = false, $use_cache = true)
{
static $cache = array(0 => false, 1 => false);
if ($cache[(int)$dontAutoSeletectOptions] !== false)
if ($cache[(int)$dontAutoSeletectOptions] !== false && $use_cache)
return $cache[(int)$dontAutoSeletectOptions];
$delivery_option_list = $this->getDeliveryOptionList($default_country);
+3 -2
View File
@@ -484,6 +484,7 @@ class OrderOpcControllerCore extends ParentOrderController
}
$carriers = $this->context->cart->simulateCarriersOutput();
$delivery_option = $this->context->cart->getDeliveryOption(null, true, false);
$vars = array(
'free_shipping' => $free_shipping,
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
@@ -497,13 +498,13 @@ class OrderOpcControllerCore extends ParentOrderController
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
'carriers' => $carriers,
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
'delivery_option' => $this->context->cart->getDeliveryOption(null, true),
'delivery_option' => $delivery_option,
'address_collection' => $this->context->cart->getAddressCollection(),
'opc' => true,
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
'carriers' => $carriers,
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
'delivery_option' => $this->context->cart->getDeliveryOption(null, true)
'delivery_option' => $delivery_option
))
);