Post by wijnendael » Mon Feb 13, 2012 12:33 am

looks like i have the same sort of problem in my updated version of opencart (1.5.1.3) with the coupon codes.
When i enter a new coupon code and attempt to use it in the shop i get the following error:- Warning: Coupon is either invalid, expired or reached it's usage limit!. I have tried editing the default coupon code of -20% and the same happens, this problem also occured in my 1.4.9.3 version but when editing a default code it worked. Everything is being entered correctly and it saves the new code it just will not work, codes that are already in the list from my previous version of opencart are working ok. I really need some help with this so that i can get it functioning correctly so all help would be appreciated
Last edited by wijnendael on Mon Feb 13, 2012 2:23 am, edited 1 time in total.

User avatar
Active Member

Posts

Joined
Thu Jan 20, 2011 5:09 am
Location - Belgium

Post by wijnendael » Mon Feb 13, 2012 1:05 am

update to my problem, i have just looked in the sql database and the coupon code/s i have entered are in there with the correct dates etc so why do they throw up the error when trying to use them ?

User avatar
Active Member

Posts

Joined
Thu Jan 20, 2011 5:09 am
Location - Belgium

Post by wijnendael » Mon Feb 13, 2012 2:22 am

Problem solved (no products selected)

User avatar
Active Member

Posts

Joined
Thu Jan 20, 2011 5:09 am
Location - Belgium

Post by Brook » Fri Mar 23, 2012 4:52 am

I want to be able to setup a Coupon so that if my Customers have this Coupon Code then they will receive 20% Off their entire order off ALL Products in their Shopping Cart. How do I setup my Coupon so that the Coupon will be Applied to ALL Products?

I do not want to have to go and select each and every product in my Admin Coupon Setup in order for the Product to be included in this Coupon. Maybe I do not understand how to setup a Coupon?

Active Member

Posts

Joined
Wed Feb 24, 2010 12:15 am

Post by wijnendael » Fri Mar 23, 2012 10:12 pm

Not 100% sure but i think if you leave the product entry empty then the code applies to all products, hope this helps

User avatar
Active Member

Posts

Joined
Thu Jan 20, 2011 5:09 am
Location - Belgium

Post by Brook » Fri Mar 23, 2012 10:26 pm

You are correct if you leave the listbox blank, not having any Products selected the Coupon will apply to all products. I figured out why I was getting the error message "Warning: Coupon is either invalid, expired or reached it's usage limit.".

The error message had nothing to do with being invalid, expired, or reaching a usage limit. I had the Admin->Sales->Coupon->Edit->Customer Login Value (Customer must be logged in to use coupon) set to "Yes" and was trying to apply the Coupon as a Guest.

To Fix the Error and allow guests to apply Coupons to their Shopping Cart, set the Customer Login Value to "No". Worked for me. Here's to hoping that the Coupon System is redesigned at some point. If the Admin Coupon System was redesigned I would hope that if the Customer Login value is set to "Yes" then Guests would not even be allowed to try to Apply a Coupon to their Shopping Cart. The error message that I was getting was not all that intuitive and had nothing to do with the fact that I had set the Customer Login value to Yes.

Hope this post helps someone else.

Active Member

Posts

Joined
Wed Feb 24, 2010 12:15 am

Post by Gorilla » Wed Apr 25, 2012 5:31 am

i just did what you did and the coupon still doesn't work :(

mike = http://www.gorillagear.ca


New member

Posts

Joined
Fri Jun 25, 2010 7:14 am

Post by Gorilla » Wed Apr 25, 2012 5:53 am

figured it out for some reason if i left the feilds blank for how maney times the coupon could be used and saved it, it would save those fields as zero.

mike = http://www.gorillagear.ca


New member

Posts

Joined
Fri Jun 25, 2010 7:14 am

Post by Gorilla » Sun Apr 29, 2012 2:07 pm

ok it stopped working again and i have no clue why the only thing i did was change servers

mike = http://www.gorillagear.ca


New member

Posts

Joined
Fri Jun 25, 2010 7:14 am

Post by Gorilla » Sun Apr 29, 2012 2:58 pm

weird i can use the coupon code as a guest but when i'm logged in i get that error ok now i logged in as someone else and its working go figure. i have no clue what is going on.

mike = http://www.gorillagear.ca


New member

Posts

Joined
Fri Jun 25, 2010 7:14 am

Post by edbond » Thu Mar 21, 2013 8:20 pm

Hey,

Does anyone know how to fix the spelling mistake it's to its ?

Customer asking about it and I haven't found it - think I'm having a blind moment and google isn't my friend today!

Ta

Ed

Newbie

Posts

Joined
Mon Dec 03, 2012 1:14 am

Post by chulann » Fri Mar 22, 2013 3:09 am

@edbond
check catalog\language\english\checkout\cart.php

New member

Posts

Joined
Sun Aug 28, 2011 11:30 pm

Post by TAC » Fri Jan 17, 2014 4:55 am

I too was having this problem but do not want guests to use coupons.

I amended the catalog\language\english\checkout\cart.php file, including fixing the incorrect spelling of its, to say "Warning: Coupon is either invalid, expired, reached its usage limit or you are not logged in to your account!"

But now get the error:

Parse error: syntax error, unexpected 'error_voucher' (T_STRING) in /var/www/vhosts/theambercat.co.uk/httpdocs/store/catalog/language/english/checkout/cart.php on line 58

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by deepu090 » Wed Aug 06, 2014 12:47 am

just add trim in your model query

it will start working
Go to /catalog/model/checkout

Replace line 6 with
$coupon_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "coupon` WHERE code = '" . trim($this->db->escape($code)) . "' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) AND status = '1'");

Newbie

Posts

Joined
Wed Aug 06, 2014 12:44 am

Post by lemarikita » Sat Jan 30, 2016 10:16 am

wijnendael wrote:update to my problem, i have just looked in the sql database and the coupon code/s i have entered are in there with the correct dates etc so why do they throw up the error when trying to use them ?

it is the start date problem, change it to one day before. and it will work. at least on my case it did.

Newbie

Posts

Joined
Thu Apr 30, 2015 12:10 am

Post by Khushiddin » Wed Oct 09, 2019 7:39 pm

Please set the value of "Total Amount" field' in Coupon addition form to greater than the value(price) of the product to which it is applied.

Newbie

Posts

Joined
Wed Oct 09, 2019 7:32 pm
Who is online

Users browsing this forum: No registered users and 62 guests