News:

Looking for documentation? Take a look on our wiki

Main Menu

show total price without discount (coupon) calculation

Started by 6.522, April 03, 2020, 22:28:41 PM

Previous topic - Next topic

6.522

Hello, how can I modify the VM calculations to show (everywhere) order total price without coupon discount. In the VM 2.6 it was quite simple. I've commented out the salesPriceCoupon in the calculationh.php (as below)

//The coupon handling is only necessary if a salesPrice is displayed, otherwise we have a kind of catalogue mode
if($this->_currencyDisplay->_priceConfig['salesPrice']){$this->_cartPrices['billTotal'] = $this->_cartPrices['salesPriceShipment'] + $this->_cartPrices['salesPricePayment'] + $this->_cartPrices['withTax']; //+ $this->_cartPrices['salesPriceCoupon'];


But in VM 3.4 it's more tricky. I'm using AwooCoupon Pro as my only payment method, so discounts are 100% (I don't want to have 0s). Users "buys" products using their account balances (gift certificates).

I have Virtuemart 3.4.2 and Joomla 3.9.6.

Regards

6.522

I guess I could use *2 to multiply 'salesPriceShipment', 'salesPricePayment' and 'withTax' but there are for sure better ways ;)