[-] FO : No error on first consultation of shopping cart with minimum purchase

This commit is contained in:
gRoussac
2013-01-24 10:22:29 +01:00
parent 4b73d72a65
commit 33f27c2c0b
2 changed files with 4 additions and 4 deletions
+1 -3
View File
@@ -39,8 +39,6 @@ class OrderControllerCore extends ParentOrderController
parent::init(); parent::init();
$this->step = (int)(Tools::getValue('step')); $this->step = (int)(Tools::getValue('step'));
if (!$this->nbProducts)
$this->step = -1;
// If some products have disappear // If some products have disappear
if (!$this->context->cart->checkQuantities()) if (!$this->context->cart->checkQuantities())
@@ -54,7 +52,7 @@ class OrderControllerCore extends ParentOrderController
$orderTotal = $this->context->cart->getOrderTotal(); $orderTotal = $this->context->cart->getOrderTotal();
$minimal_purchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); $minimal_purchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency);
if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimal_purchase && $this->step != -1) if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimal_purchase && $this->step > 0)
{ {
$this->step = 0; $this->step = 0;
$this->errors[] = sprintf( $this->errors[] = sprintf(
+2
View File
@@ -548,6 +548,8 @@ function updateCartSummary(json)
if (typeof json === 'undefined') if (typeof json === 'undefined')
return; return;
$('div.error').fadeOut();
$('.cart_quantity_input').val(0); $('.cart_quantity_input').val(0);
product_list = {}; product_list = {};