Author Topic: [solved]Cart: Coupon error on checkout / confirm  (Read 2596 times)

okgrowin

  • Beginner
  • *
  • Posts: 7
[solved]Cart: Coupon error on checkout / confirm
« 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
Code: [Select]
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

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28314
  • Always on vacation
    • Jenkin Hill Internet
Re: Cart: Coupon error on checkout / confirm
« Reply #1 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.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29

Three_d

  • Jr. Member
  • **
  • Posts: 60
Re: Cart: Coupon error on checkout / confirm J. 3.3.6 - VM 3.0.3
« Reply #2 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

okgrowin

  • Beginner
  • *
  • Posts: 7
Re: Cart: Coupon error on checkout / confirm
« Reply #3 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.
Code: [Select]
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.

Three_d

  • Jr. Member
  • **
  • Posts: 60
Re: Cart: Coupon error on checkout / confirm
« Reply #4 on: February 02, 2015, 15:37:23 pm »
For me also a template override bug.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10273
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Cart: Coupon error on checkout / confirm
« Reply #5 on: February 02, 2015, 17:52:49 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).
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/