meabed / Paypal-Multi-Currency-Magento

Paypal Multi Currency Magento
27 stars 5 forks source link

Discount calculation issue causing cart to show wrong values #10

Open hemal108 opened 7 years ago

hemal108 commented 7 years ago

FILE: Web/Ppfix/Model/Cart.php Method _validate()

Lines if (!$this->_isDiscountAsItem) { $discountAmount = Mage::helper('ppfix')->getExchangeRate($this->_totals[self::TOTAL_DISCOUNT]); $sum -= $discountAmount; // $sum -= $this->_totals[self::TOTAL_DISCOUNT]; }

// PayPal requires to have discount less than items subtotal if (!$this->_isDiscountAsItem) { $this->_areTotalsValid = round($discountAmount, 4) < round($itemsSubtotal, 4); } else { $this->_areTotalsValid = $itemsSubtotal > 0.00001; }