[-] FO : isVirtualCart was forced to false

This commit is contained in:
gRoussac
2013-10-07 12:06:28 +02:00
parent e3db5570d0
commit d125ca0a36
3 changed files with 3 additions and 8 deletions
+2 -5
View File
@@ -94,8 +94,6 @@ class OrderControllerCore extends ParentOrderController
*/ */
public function initContent() public function initContent()
{ {
global $isVirtualCart;
parent::initContent(); parent::initContent();
if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateExtraCarrier') if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateExtraCarrier')
@@ -117,7 +115,7 @@ class OrderControllerCore extends ParentOrderController
} }
if ($this->nbProducts) if ($this->nbProducts)
$this->context->smarty->assign('virtual_cart', $isVirtualCart); $this->context->smarty->assign('virtual_cart', $this->context->cart->isVirtualCart());
// 4 steps to the order // 4 steps to the order
switch ((int)$this->step) switch ((int)$this->step)
@@ -225,12 +223,11 @@ class OrderControllerCore extends ParentOrderController
*/ */
public function autoStep() public function autoStep()
{ {
global $isVirtualCart;
if ($this->step >= 2 && (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice)) if ($this->step >= 2 && (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice))
Tools::redirect('index.php?controller=order&step=1'); Tools::redirect('index.php?controller=order&step=1');
if ($this->step > 2 && !$isVirtualCart && count($this->context->cart->getDeliveryOptionList()) == 0) if ($this->step > 2 && !$this->context->cart->isVirtualCart() && count($this->context->cart->getDeliveryOptionList()) == 0)
Tools::redirect('index.php?controller=order&step=2'); Tools::redirect('index.php?controller=order&step=2');
$delivery = new Address((int)$this->context->cart->id_address_delivery); $delivery = new Address((int)$this->context->cart->id_address_delivery);
+1 -1
View File
@@ -40,7 +40,7 @@ class OrderOpcControllerCore extends ParentOrderController
parent::init(); parent::init();
if ($this->nbProducts) if ($this->nbProducts)
$this->context->smarty->assign('virtual_cart', false); $this->context->smarty->assign('virtual_cart', $this->context->cart->isVirtualCart());
$this->context->smarty->assign('is_multi_address_delivery', $this->context->cart->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1)); $this->context->smarty->assign('is_multi_address_delivery', $this->context->cart->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1));
$this->context->smarty->assign('open_multishipping_fancybox', (int)Tools::getValue('multi-shipping') == 1); $this->context->smarty->assign('open_multishipping_fancybox', (int)Tools::getValue('multi-shipping') == 1);
@@ -57,8 +57,6 @@ class ParentOrderControllerCore extends FrontController
$this->nbProducts = $this->context->cart->nbProducts(); $this->nbProducts = $this->context->cart->nbProducts();
global $isVirtualCart;
if (!$this->context->customer->isLogged(true) && $this->context->getMobileDevice() && Tools::getValue('step')) if (!$this->context->customer->isLogged(true) && $this->context->getMobileDevice() && Tools::getValue('step'))
Tools::redirect($this->context->link->getPageLink('authentication', true, (int)$this->context->language->id, $params)); Tools::redirect($this->context->link->getPageLink('authentication', true, (int)$this->context->language->id, $params));