VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: rheo on July 15, 2013, 07:49:29 AM

Title: Problem using discount coupon - Not reflect on final price
Post by: rheo on July 15, 2013, 07:49:29 AM
I'm using Virtuemart 2.0.12f
Joomla 2.5.7

I have tried using the discount coupon.
When i enter the coupon it shows up in the cart .. and the discount amount is shown

Product Prices result also is the correct amount.

However right at the bottom, the Total price does not reflect the discounted amount...

Any ideas how do i check this code? Which file do i look at?? without upgrading my version..


Title: Re: Problem using discount coupon - Not reflect on final price
Post by: rheo on July 16, 2013, 10:08:28 AM
Any ideas anyone???

I've found out its all done under calculationh.php however i'm not sure how to edit to add in the coupon discount value to the total price..   

Title: Re: Problem using discount coupon - Not reflect on final price
Post by: jenkinhill on July 16, 2013, 10:24:20 AM
Suggest you update your VM version, as this was fixed a few versions ago. We are currently at 2.0.20a
Title: Re: Problem using discount coupon - Not reflect on final price
Post by: rheo on July 16, 2013, 12:38:03 PM
I had problem updating and its too much of a trouble as I only need the coupon discount to work... I dont need anything else done..

Anyways... I did a hack on the calculationh.php based on the latest Virtuemart version and just replace that file and it works perfectly now...

I downloaded the latest version and used the calculationh.php file .. just edited one line of it and replaced this file..
Changed
+ $this->_cartPrices['salesPriceCoupon'];

To
- $this->_cartPrices['salesPriceCoupon'];


$this->_cartPrices['billTotal'] = $this->_cartPrices['salesPriceShipment'] + $this->_cartPrices['salesPricePayment'] + $this->_cartPrices['withTax'] - $this->_cartPrices['salesPriceCoupon'];


So it subtracts the coupon value from the final price..
Title: Re: Problem using discount coupon - Not reflect on final price
Post by: jenkinhill on July 16, 2013, 12:53:52 PM
We do not support editing the core code but if you are happy to do it and have not introduced another bug then OK.
Title: Re: Problem using discount coupon - Not reflect on final price
Post by: rheo on July 16, 2013, 14:18:37 PM
Ic,

okay thanks...

For the upgrading... I have problems because i set my folder permissions 755, and ive tested installing on a test site, the folder permissions prevent me from doing a proper installation.. Its pretty difficult as there are so many files..

Title: Re: Problem using discount coupon - Not reflect on final price
Post by: jenkinhill on July 16, 2013, 23:09:35 PM
755 for directories and 644 for files is exactly what is recommended for a Joomla site (unless read only, like config files, which would usually be 444). Unless you have a badly set up server that should be the permissions used by default and will not prevent any updates using the Joomla extensions installer..
Title: Re: Problem using discount coupon - Not reflect on final price
Post by: rheo on July 17, 2013, 06:20:14 AM
Hi,
Unfortunately I do not control the server, its setup by a hosting company which I pay yearly. But thanks for the information. Will contact the hosting company to check if they can rectify this issue.