[-] 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:
+2
-2
@@ -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);
|
||||
|
||||
@@ -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
|
||||
))
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user