[-] FO : #PSCFI-5795 : fixed a bug where the opc freeze when an Order is to 0
This commit is contained in:
@@ -303,10 +303,10 @@ class OrderDetailCore extends ObjectModel
|
||||
|
||||
if (count($this->tax_calculator->taxes) == 0)
|
||||
return true;
|
||||
|
||||
|
||||
if ($order->total_products <= 0)
|
||||
return true;
|
||||
|
||||
|
||||
$ratio = $this->unit_price_tax_excl / $order->total_products;
|
||||
$order_reduction_amount = $order->total_discounts_tax_excl * $ratio;
|
||||
$discounted_price_tax_excl = $this->unit_price_tax_excl - $order_reduction_amount;
|
||||
|
||||
@@ -428,7 +428,6 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
return '<p class="warning">'.Tools::displayError('Error: no currency has been selected').'</p>';
|
||||
if (!$this->context->cookie->checkedTOS && Configuration::get('PS_CONDITIONS'))
|
||||
return '<p class="warning">'.Tools::displayError('Please accept the Terms of Service').'</p>';
|
||||
|
||||
/* If some products have disappear */
|
||||
if (!$this->context->cart->checkQuantities())
|
||||
return '<p class="warning">'.Tools::displayError('An item in your cart is no longer available, you cannot proceed with your order.').'</p>';
|
||||
|
||||
Reference in New Issue
Block a user