Page 1 of 1

[solved] Can't purchase the Gift Certificate!

Posted: Mon Dec 12, 2011 10:20 am
by tranconghoan
Hi all,

I got a problem while trying to buy a gift certificate. Opencart doesn't allow me to checkout, it just got stuck at the Shopping Cart page.

Please check it here: http://vanduyphuong.com.vn/temporary/in ... ut/voucher

Thank yoouuuu..... :'(

Re: Can't purchase the Gift Certificate!

Posted: Mon Dec 12, 2011 10:52 am
by tranconghoan
it sounds crazy, it works now, I even haven't know the reason yet. I just modified the language file and Boomm..

Re: Can't purchase the Gift Certificate!

Posted: Mon Dec 12, 2011 10:56 am
by tranconghoan
No..... it's crazy indeed! It only go to the checkout page if I have at least one product to go with the Gift Voucher in order to check it out!! Help again, I believe the language file has no responsibility here... Please :'(

Re: Can't purchase the Gift Certificate!

Posted: Mon Dec 12, 2011 3:00 pm
by tranconghoan
Does anyone know? :'(

Re: Can't purchase the Gift Certificate!

Posted: Mon Dec 12, 2011 4:13 pm
by tranconghoan
Doesnt anyone know how to stop my tears.... :'(

Re: Can't purchase the Gift Certificate!

Posted: Mon Dec 12, 2011 4:16 pm
by uksitebuilder

Re: [solved] Can't purchase the Gift Certificate!

Posted: Mon Dec 12, 2011 4:44 pm
by tranconghoan
Wow.. I can smile again :laugh: Thank you, I really appreciate it!

Here is the solution for who has the same problem.

open: catalog/controller/checkout/checkout.php

find

Code: Select all

      if ((!$this->cart->hasProducts() && !empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
change to

Code: Select all

      if ((!$this->cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {

Re: [solved] Can't purchase the Gift Certificate!

Posted: Sat Feb 11, 2012 12:02 pm
by afonte
Thank you! Worked perfectly :D

Re: [solved] Can't purchase the Gift Certificate!

Posted: Sun Feb 19, 2012 8:55 am
by donyeh
Thanks for the tips, I've got it working.

Cheers! :D

Re: [solved] Can't purchase the Gift Certificate!

Posted: Mon Feb 20, 2012 11:23 pm
by sunriser
Thanks uksitebuilder, works perfectly!

Re: [solved] Can't purchase the Gift Certificate!

Posted: Mon Feb 27, 2012 7:09 am
by Charlie--
@uksitebuilder - Thank you for this fix - It was driving me mad. (damn that ! in the code)

Just started with OpenCart and I must say I am really liking it so far. (Bit of a learning curve for me as I am more used to perl) - Yes there seem to be some bugs (but all programs have them) the main point is the ease of fixing them & the community support, and you guys have got it covered. Keep up the great work, thanks again.