// Multishipping : on opc, on putting multi-shipping to off, the cart is set to one address delivery

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10458 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2011-11-22 17:18:30 +00:00
parent 4dc0ebb2de
commit 5532f12d80
5 changed files with 60 additions and 7 deletions
+9
View File
@@ -40,6 +40,9 @@ class OrderOpcControllerCore extends ParentOrderController
if ($this->nbProducts)
$this->context->smarty->assign('virtual_cart', false);
$this->context->smarty->assign('is_multi_address_delivery', $this->context->cart->isMultiAddressDelivery());
$this->isLogged = (bool)($this->context->customer->id AND Customer::customerIdExistsStatic((int)($this->context->cookie->id_customer)));
if ($this->context->cart->nbProducts())
@@ -211,6 +214,7 @@ class OrderOpcControllerCore extends ParentOrderController
$this->setTemplate(_PS_THEME_DIR_.'order-address-multishipping-products.tpl');
$this->display();
die();
break;
case 'cartReload':
$this->_assignSummaryInformations();
if ($this->context->customer->id)
@@ -221,6 +225,11 @@ class OrderOpcControllerCore extends ParentOrderController
$this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl');
$this->display();
die();
break;
case 'noMultiAddressDelivery':
$this->context->cart->setNoMultishipping();
die();
break;
default:
throw new PrestashopException('Unknown method "'.Tools::getValue('method').'"');
}