[-] 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
|
* Get the delivery option seleted, or if no delivery option was selected, the cheapest option for each address
|
||||||
* @return array delivery option
|
* @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);
|
static $cache = array(0 => false, 1 => false);
|
||||||
if ($cache[(int)$dontAutoSeletectOptions] !== false)
|
if ($cache[(int)$dontAutoSeletectOptions] !== false && $use_cache)
|
||||||
return $cache[(int)$dontAutoSeletectOptions];
|
return $cache[(int)$dontAutoSeletectOptions];
|
||||||
|
|
||||||
$delivery_option_list = $this->getDeliveryOptionList($default_country);
|
$delivery_option_list = $this->getDeliveryOptionList($default_country);
|
||||||
|
|||||||
@@ -484,6 +484,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$carriers = $this->context->cart->simulateCarriersOutput();
|
$carriers = $this->context->cart->simulateCarriersOutput();
|
||||||
|
$delivery_option = $this->context->cart->getDeliveryOption(null, true, false);
|
||||||
$vars = array(
|
$vars = array(
|
||||||
'free_shipping' => $free_shipping,
|
'free_shipping' => $free_shipping,
|
||||||
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
|
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
|
||||||
@@ -497,13 +498,13 @@ class OrderOpcControllerCore extends ParentOrderController
|
|||||||
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||||
'carriers' => $carriers,
|
'carriers' => $carriers,
|
||||||
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
|
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
|
||||||
'delivery_option' => $this->context->cart->getDeliveryOption(null, true),
|
'delivery_option' => $delivery_option,
|
||||||
'address_collection' => $this->context->cart->getAddressCollection(),
|
'address_collection' => $this->context->cart->getAddressCollection(),
|
||||||
'opc' => true,
|
'opc' => true,
|
||||||
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
|
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
|
||||||
'carriers' => $carriers,
|
'carriers' => $carriers,
|
||||||
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
'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