Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / coupons expired not showing inactive

coupons expired not showing inactive

Views: 34,536

Results 21 to 40 of 42
24 Feb 2011, 4:50 PM
#21
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

coupons expired not showing inactive

BlessIsaacola:

Ajeh,

I tried today to delete a coupon on the Admin side and it basically just changed the status to inactive instead of deleting it from the database. Any ideas?

Thanks!
That is by design.

24 Feb 2011, 5:14 PM
#22
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: coupons expired not showing inactive

Thanks DrByte! In that case I need to go find a different thread to attach my issue. I was prompted to delete a coupon today when an expired coupon was accepted as valid by Zen Cart. I will go look for the best thread to pick up this issue.

Thanks!

30 Apr 2011, 2:52 PM
#23
kavlito avatar

kavlito

New Zenner

Join Date:
Sep 2009
Posts:
40
Plugin Contributions:
0

Re: coupons expired not showing inactive

s_mack:

Also - entering in an "inactive" coupon code into the discount_coupon page still shows all the info for that coupon. What exactly is the difference between active and inactive then?

To me, and I think others would agree, "inactive" should be any coupon that can't currently be used - either because the admin set it to inactive, or it has expired. I also suggest that any coupon should be able to be active again simply by changing the dates and/or setting its status back to "active".

Just suggestions.

  • Steven

This is exactly what I have been trying to resolve. If any of my coupons have expired, they should show in the Inactive Coupons. I do not want them showing as Active when they are inactive. This is extremely confusing for my customer service reps. We are using coupon codes extensively and it's getting very difficult to manage them when they do not show under the correct status. Unfortunately, I do not know enough about PHP coding to make the necessary changes. These posts are from 2006 and it seems have been dismissed.

Also, re: 'any coupon should be able to be active again simply by changing the dates and/or setting its status back to "active".
', I found this: http://www.numinix.com/blog/2010/10/07/how-to-make-an-inactive-coupon-active/

30 Apr 2011, 4:33 PM
#24
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: coupons expired not showing inactive

Well the problem is two fold ...

If the Discount Coupons were automatically set to Inactive, then you could not fully edit the Discount Coupon once it expired as now it is Inactive ... because while you could "edit" the Inactive coupon, you cannot set the status to make it Active ...

If you Delete the coupon, that will set it to Inactive ...

NOTE: if someone tries to use an expired coupon, even if set to Active, it cannot be used ...

NOTE: Inactive Coupons can be copied to new Active Coupons with the copy button ...

If deleting the expired coupons is too much to manage manually, you could write some custom code to set the Discount Coupons to Inactive when they expire, similar to how the banners expire or the featured products expire etc.

3 May 2011, 8:53 PM
#25
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: coupons expired not showing inactive

So I have a coupon that expired.

I edited the coupon and extended the expiration date. But it still doesn't allow customers to use it.

Coupon status is set to active Y

Can you edit the expiration date after the coupon expire?

3 May 2011, 10:40 PM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: coupons expired not showing inactive

I am not able to duplicate that ...

If I have a Discount Coupon and enter the code and am told it is expired ... and that Discount Coupon is showing as Status Y ... I simply edit the Discount Coupon and change the expiration date and the Discount Coupon is now Valid ....

3 May 2011, 11:17 PM
#27
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: coupons expired not showing inactive

What if the coupon is inactive and you change it's status to active in database "coupons table"? shouldn't that make it work again? Is there any other tables that effect the coupons?

Note: Coupon has categories restrictions.

3 May 2011, 11:26 PM
#28
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: coupons expired not showing inactive

If you manually were to change the Discount Coupon to Active where Status reads: Y

then it would come back to life one day ... just like Frosty ... :cool:

err ... umm ... yes it would then be able to be made Active and current when the expiration date is fixed ...

4 May 2011, 10:23 AM
#29
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: coupons expired not showing inactive

Thanks

Then it's gotta be something else on my site making it not work.

4 May 2011, 12:48 PM
#30
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: coupons expired not showing inactive

Does the message when you use it say:
This coupon has expired

or do you see some other message when it fails?

4 May 2011, 5:39 PM
#31
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: coupons expired not showing inactive

Actually the message displays a successful message

"Congratulations you have redeemed the Discount Coupon"

But the price doesn't change and the total stays the same.

4 May 2011, 5:42 PM
#32
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: coupons expired not showing inactive

What are all the settings on the Discount Coupon that you are using?

4 May 2011, 5:46 PM
#33
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: coupons expired not showing inactive

Same as other coupons... We do have custom work done to the site, it might of affected it. I have to dig deep into it.

22 Feb 2012, 9:12 PM
#34
kavlito avatar

kavlito

New Zenner

Join Date:
Sep 2009
Posts:
40
Plugin Contributions:
0

Re: coupons expired not showing inactive

kavlito:

This is exactly what I have been trying to resolve. If any of my coupons have expired, they should show in the Inactive Coupons. I do not want them showing as Active when they are inactive. This is extremely confusing for my customer service reps. We are using coupon codes extensively and it's getting very difficult to manage them when they do not show under the correct status. Unfortunately, I do not know enough about PHP coding to make the necessary changes. These posts are from 2006 and it seems have been dismissed.

Also, re: 'any coupon should be able to be active again simply by changing the dates and/or setting its status back to "active".
', I found this: http://www.numinix.com/blog/2010/10/07/how-to-make-an-inactive-coupon-active/

One thing I've done to help me manage my coupon codes is to change the displayed sort order by Expires date in decending order so that I see my most recent "active" coupons first.

In admin/coupon_admin.php, I added ORDER BY coupon_expires_date DESC around lines 1020 & 1022. See mods in red below:

if ($status != '*') {
      $cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from " . TABLE_COUPONS ." where coupon_active='" . zen_db_input($status) . "' and coupon_type != 'G' ORDER BY coupon_expire_date DESC";
    } else {
      $cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from " . TABLE_COUPONS . " where coupon_type != 'G' ORDER BY coupon_expire_date DESC";
    }

P.S., "air quotes" are necessary when using the terms "active" and "inactive" in the context of coupon codes as their actual meanings seem to be skewed. ;)

6 Oct 2014, 6:59 PM
#35
abcisme avatar

abcisme

Zen Follower

Join Date:
Jun 2006
Posts:
298
Plugin Contributions:
0

Re: coupons expired not showing inactive

I know this is an old thread, but maybe this will help someone.

This code excludes expired coupons from the "Active" listing and sorts the coupons by type, then amount. To see all "Active" coupons, including expired coupons, just select the "All Coupons" list from the dropdown.

   if ($status != '*') {
      $cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from " . TABLE_COUPONS ." where coupon_active='" . zen_db_input($status) . "' and coupon_type != 'G' AND coupon_expire_date >= CURDATE() ORDER BY coupon_type ASC, coupon_amount ASC";
    } else {
      $cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from " . TABLE_COUPONS . " where coupon_type != 'G' ORDER BY coupon_type ASC, coupon_amount ASC";
    }
4 May 2015, 4:52 PM
#36
abcisme avatar

abcisme

Zen Follower

Join Date:
Jun 2006
Posts:
298
Plugin Contributions:
0

Re: coupons expired not showing inactive

Was having issues with the coupon list.. updated the query to:

      if($status == 'Y') { $cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from " . TABLE_COUPONS ." where coupon_active='Y' AND coupon_expire_date >= CURDATE() and coupon_type != 'G' ORDER BY coupon_type ASC, coupon_amount ASC"; }
     elseif ($status == 'N') { $cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from " . TABLE_COUPONS ." where coupon_active='N' AND coupon_type != 'G' ORDER BY coupon_type ASC, coupon_amount ASC"; }
      else { $cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from " . TABLE_COUPONS . " where coupon_type != 'G' ORDER BY coupon_type ASC, coupon_amount ASC";
    } 
28 Dec 2016, 5:55 PM
#37
k_mcintyre avatar

k_mcintyre

New Zenner

Join Date:
Oct 2013
Location:
Indiana, United States
Posts:
5
Plugin Contributions:
0

Re: coupons expired not showing inactive

I realize this is a very old thread, but I am having this exact same problem... I don't think the original poster was communicating himself correctly, which is why he was unable to receive the correct answer.... I'm going to give this a shot myself, hopefully someone will understand what I am trying to communicate here.

I too am using Zencart. Yes it is the most recent version of Zencart. I am having a problem with my coupon codes (discount codes) as well...

|Here is my problem....

I am having problems re-using coupon/discount codes as well. I am familiar with the Admin panel, however once a coupon code expires, that's it... it non-usable again, ever! Even if I toggle to the "Inactive" coupon code page, I am still unable to effective edit, or change the status of any of the old coupon codes.

There does not exist a way for which to change the "N", to a "Yes", or a "Y", or any other letter of the alphabet for that matter. Even change the date of the coupon code does not allow me to use it again, once it's expired, it is FOREVER dead! I have even tried re-naming the old coupon codes to some other string of letters so that I could be able to re-use the name that way, and that doesn't work either! There is no option on the buttons to the right to turn it back on, there is no option inside the coupon code settings to turn it on/off, there is nothing that works which will allow me to re-name, change the date of, or adjust any setting which will allow me to use any coupon code that has become expired. Once they expire, they are never to be used again.

So, what am I over looking? What is the fix for this? Or is this by chance perhaps some weird glitch in the Zencart design that has somehow gone overlooked all these years? I would REALLY love to be able to reuse these coupon codes, but nothing I try allows me to dot hat. please help.

28 Dec 2016, 6:23 PM
#38
k_mcintyre avatar

k_mcintyre

New Zenner

Join Date:
Oct 2013
Location:
Indiana, United States
Posts:
5
Plugin Contributions:
0

Re: coupons expired not showing inactive

I realize this is a very old thread, but I am having this exact same problem... I don't think the original poster was communicating himself correctly, which is why he was unable to receive the correct answer.... I'm going to give this a shot myself, hopefully someone will understand what I am trying to communicate here.

I too am using Zencart. Yes it is the most recent version of Zencart. I am having a problem with my coupon codes (discount codes) as well...

|Here is my problem....

I am having problems re-using coupon/discount codes as well. I am familiar with the Admin panel, however once a coupon code expires, that's it... it non-usable again, ever! Even if I toggle to the "Inactive" coupon code page, I am still unable to effective edit, or change the status of any of the old coupon codes.

There does not exist a way for which to change the "N", to a "Yes", or a "Y", or any other letter of the alphabet for that matter. Even change the date of the coupon code does not allow me to use it again, once it's expired, it is FOREVER dead! I have even tried re-naming the old coupon codes to some other string of letters so that I could be able to re-use the name that way, and that doesn't work either! There is no option on the buttons to the right to turn it back on, there is no option inside the coupon code settings to turn it on/off, there is nothing that works which will allow me to re-name, change the date of, or adjust any setting which will allow me to use any coupon code that has become expired. Once they expire, they are never to be used again.

So, what am I over looking? What is the fix for this? Or is this by chance perhaps some weird glitch in the Zencart design that has somehow gone overlooked all these years? I would REALLY love to be able to reuse these coupon codes, but nothing I try allows me to dot hat. please help.

31 Dec 2016, 4:32 PM
#39
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,956
Plugin Contributions:
8

Re: coupons expired not showing inactive

i see your dilemma.... i think....

assume the coupon you want to re-activate is called: 'COUPONCODE'

the easiest thing to do would be as follows:

admin -> tools -> install SQL patches and then run the following statement:

update coupons set coupon_active = 'Y' where coupon_code = 'COUPONCODE';

as with all things SQL, use at your own peril!

good luck!

12 Dec 2018, 6:11 PM
#40
rios avatar

rios

New Zenner

Join Date:
Dec 2018
Posts:
4
Plugin Contributions:
0

Re: coupons expired not showing inactive

Thanks for your help CarlWhat.

I know it's an old thread, but my cart 1.5.4 is not automatically changing the coupon status to inactive after the set "end date". I have coupons that ended 2-3 years ago and still showing as active.
I do not have the knowledge to create codes to fix it, but I can modify files if anyone give me some directions.
Thanks in advance guys!