[-] FO : No error on first consultation of shopping cart with minimum purchase
This commit is contained in:
@@ -39,8 +39,6 @@ class OrderControllerCore extends ParentOrderController
|
||||
parent::init();
|
||||
|
||||
$this->step = (int)(Tools::getValue('step'));
|
||||
if (!$this->nbProducts)
|
||||
$this->step = -1;
|
||||
|
||||
// If some products have disappear
|
||||
if (!$this->context->cart->checkQuantities())
|
||||
@@ -54,7 +52,7 @@ class OrderControllerCore extends ParentOrderController
|
||||
|
||||
$orderTotal = $this->context->cart->getOrderTotal();
|
||||
$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->errors[] = sprintf(
|
||||
|
||||
@@ -229,7 +229,7 @@ function updateAddressId(id_product, id_product_attribute, old_id_address_delive
|
||||
function updateQty(val, cart, el)
|
||||
{
|
||||
var prefix = "";
|
||||
|
||||
|
||||
if (typeof(cart) === 'undefined' || cart)
|
||||
prefix = '#order-detail-content ';
|
||||
else
|
||||
@@ -547,6 +547,8 @@ function updateCartSummary(json)
|
||||
|
||||
if (typeof json === 'undefined')
|
||||
return;
|
||||
|
||||
$('div.error').fadeOut();
|
||||
|
||||
$('.cart_quantity_input').val(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user