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

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15029 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-05-03 08:58:35 +00:00
parent 0e2d9240bd
commit 2169016b87
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();