VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: okgrowin on January 27, 2015, 20:37:13 PM

Title: [solved]Cart: Coupon error on checkout / confirm
Post by: okgrowin on January 27, 2015, 20:37:13 PM
When i save a coupon, the cart page finds it and applies the discount.
Now the input box says "Change your Coupon code"

joomla 3.3.6
virtuemart 2.9.9b
OS Linux b
PHP 5.4.34
MySQLi 5.5.40-36.1-log

Problem: when user tries to checkout it says Coupon code not found and doesn't allow the user to checkout.....

Workaround: don't save the coupon, just enter the coupon code into the input and checkout / confirm order

Hypothesis: it's trying to process the "Change your Coupon code" string as a coupon?

Test: comment out the coupon text fill in

cart\view.html.php

private function lSelectCoupon() {

$this->couponCode = (!empty($this->cart->couponCode) ? $this->cart->couponCode : '');
/*
$this->coupon_text = $this->cart->couponCode ? vmText::_('COM_VIRTUEMART_COUPON_CODE_CHANGE') : vmText::_('COM_VIRTUEMART_COUPON_CODE_ENTER');
*/
}


Results: No error...

Conclusion: there must be a bug, its processing COM_VIRTUEMART_COUPON_CODE_CHANGE as a coupon or something..
My site wasn't getting orders with my new coupon for a month before someone told me... oops
Title: Re: Cart: Coupon error on checkout / confirm
Post by: jenkinhill on January 27, 2015, 21:04:59 PM
VM2.9.9b was a test/development version which was not intended for use on a live site - and contained a lot of bugs.

The current stable version of VM3 is 3.0.3 - and 3.0.4 will be released very soon. Suggest you update and then see if your problem is solved.
Title: Re: Cart: Coupon error on checkout / confirm J. 3.3.6 - VM 3.0.3
Post by: Three_d on January 28, 2015, 14:30:57 PM
I get the same error as okgrowin but I use VirtueMart 3.0.3 on Joomla 3.3.6.

If you save the Coupon code in the cart it doesn't work.
But if you enter the Coupon code in the input field and confirm the order it works.

Jeroen
Title: Re: Cart: Coupon error on checkout / confirm
Post by: okgrowin on January 28, 2015, 17:30:25 PM
installed 3.0.3 overtop of my version. (wow so many database changes lol)

it appears the view was overwritten.
private function lSelectCoupon() {

$this->couponCode = (!empty($this->cart->couponCode) ? $this->cart->couponCode : '');
$this->coupon_text = $this->cart->couponCode ? vmText::_('COM_VIRTUEMART_COUPON_CODE_CHANGE') : vmText::_('COM_VIRTUEMART_COUPON_CODE_ENTER');
}


Checkout now goes through withe the alt text there, so it appears to be fixed in this version.
Title: Re: Cart: Coupon error on checkout / confirm
Post by: Three_d on February 02, 2015, 15:37:23 PM
For me also a template override bug.
Title: Re: Cart: Coupon error on checkout / confirm
Post by: Milbo on February 02, 2015, 17:52:49 PM
Quote from: okgrowin on January 28, 2015, 17:30:25 PM
installed 3.0.3 overtop of my version. (wow so many database changes lol)

It looks a lot, but most of them, just do int(11) to in(1).