// If an order contain only virtual products, don't set a carrier to the order

This commit is contained in:
mDeflotte
2012-05-03 08:58:35 +00:00
parent 32745f4ba3
commit 9a8756ca96
3 changed files with 31 additions and 18 deletions
+7 -5
View File
@@ -150,11 +150,13 @@ class OrderControllerCore extends ParentOrderController
Tools::redirect('index.php?controller=order&step=2');
// Check the delivery option is setted
if (!Tools::getValue('delivery_option'))
Tools::redirect('index.php?controller=order&step=2');
foreach (Tools::getValue('delivery_option') as $delivery_option)
if (empty($delivery_option))
Tools::redirect('index.php?controller=order&step=2');
if (!Tools::getValue('delivery_option') && !$this->context->cart->isVirtualCart())
{
Tools::redirect('index.php?controller=order&step=2');
foreach (Tools::getValue('delivery_option') as $delivery_option)
if (empty($delivery_option))
Tools::redirect('index.php?controller=order&step=2');
}
$this->autoStep();