// Retrocompatibility : Now old 1.4 template works with new chechout process. Multishipping cannot be enabled.
This commit is contained in:
@@ -64,7 +64,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
}
|
||||
break;
|
||||
case 'updateCarrierAndGetPayments':
|
||||
if (Tools::isSubmit('delivery_option') AND Tools::isSubmit('recyclable') AND Tools::isSubmit('gift') AND Tools::isSubmit('gift_message'))
|
||||
if ((Tools::isSubmit('delivery_option') || Tools::isSubmit('id_carrier')) AND Tools::isSubmit('recyclable') AND Tools::isSubmit('gift') AND Tools::isSubmit('gift_message'))
|
||||
{
|
||||
if ($this->_processCarrier())
|
||||
{
|
||||
@@ -358,11 +358,12 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
{
|
||||
if (!$this->isLogged)
|
||||
{
|
||||
$carriers = Carrier::getCarriersForOrder(Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT')));
|
||||
$carriers = $this->context->cart->simulateCarriersOutput();
|
||||
$this->context->smarty->assign(array(
|
||||
'HOOK_EXTRACARRIER' => NULL,
|
||||
'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array(
|
||||
'carriers' => $carriers,
|
||||
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
|
||||
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||
'delivery_option' => $this->context->cart->getDeliveryOption()
|
||||
))
|
||||
@@ -432,6 +433,8 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
else
|
||||
$link_conditions .= '&content_only=1';
|
||||
|
||||
$carriers = $this->context->cart->simulateCarriersOutput();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
|
||||
'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')),
|
||||
@@ -442,6 +445,8 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
'recyclable' => (int)($this->context->cart->recyclable),
|
||||
'gift_wrapping_price' => (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE')),
|
||||
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||
'carriers' => $carriers,
|
||||
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
|
||||
'delivery_option' => $this->context->cart->getDeliveryOption(),
|
||||
'address_collection' => $this->context->cart->getAddressCollection(),
|
||||
'opc' => true));
|
||||
@@ -456,8 +461,6 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$this->errors[] = Tools::displayError('This address is invalid.');
|
||||
else
|
||||
{
|
||||
$carriers = Carrier::getCarriersForOrder((int)Address::getZoneById((int)($address_delivery->id)), $groups);
|
||||
|
||||
$result = array(
|
||||
'HOOK_BEFORECARRIER' => Hook::exec('beforeCarrier', array(
|
||||
'carriers' => $carriers,
|
||||
|
||||
Reference in New Issue
Block a user