I want the expired coupons to be available after expiry. Therefore I selected the option to move them to different category on expiry. That works, but then they still show up on the homepage (or the next pages). How can I remove them there, and only let them show in the Expired-tab in stores or search.
Thanks!
Mark Fail
Super Guru12,885 points
July 18, 2013 at 2:45 am
its a tricky one since there isnt anyway to know they have expired using basic wordpess queries. You would need to customize the display code to hide or remove the expired coupons from display.
functions file is found: PPT/class/class_design.php
Aaron
Super Guru922 points
July 18, 2013 at 3:16 am
Get your expired cat ID and add something like this to the query: cat=-144
Where 144 is your expired cat ID.
Mark Fail
Super Guru12,885 points
July 18, 2013 at 3:38 am
thanks Aaron
Guido
Newbie37 points
July 19, 2013 at 3:00 pm
Thanks guys.
I found an option to exclude some cats @ General Display Options > Category, but that only works for the Category Block on the homepage. The file class_design.php has a lot of code.
Am I looking for code in */ === VERSION 7 HOME PAGE OBJECTS === ?
I want to know where to find Expired voucher ID too.
At meanwhile, I am thinking if there is a way to set function such as:
if a voucher expiry time = 00:00:00, then the voucher should not display, I don’t know how to write a code to work for this, may be someone here can do…
Josh
Super Guru13,885 points
February 22, 2017 at 12:56 pm
Hello Zhuoling,
Hover over the expired coupon and check left bottom corner of your screen to view listing/coupon id.Its also displayed just below the coupon title.See attached image
Guido
Hi,
I want the expired coupons to be available after expiry. Therefore I selected the option to move them to different category on expiry. That works, but then they still show up on the homepage (or the next pages). How can I remove them there, and only let them show in the Expired-tab in stores or search.
Thanks!
Mark Fail
its a tricky one since there isnt anyway to know they have expired using basic wordpess queries. You would need to customize the display code to hide or remove the expired coupons from display.
functions file is found: PPT/class/class_design.php
Aaron
Get your expired cat ID and add something like this to the query:
cat=-144
Where 144 is your expired cat ID.
Mark Fail
thanks Aaron
Guido
Thanks guys.
I found an option to exclude some cats @ General Display Options > Category, but that only works for the Category Block on the homepage. The file class_design.php has a lot of code.
Am I looking for code in */ === VERSION 7 HOME PAGE OBJECTS === ?
What do I need to change?
Guido
For anyone else who wants to do this:
Change rule #2295 in class_design.php
from:
$GLOBALS[‘query_string_new’].=”&paged=”.$paged;
to:
$GLOBALS[‘query_string_new’].=”&paged=”.$paged”&cat=-XXXX”;
where XXXX is the category ID you want to hide.
YAEL
Thanks Guido
Mark Fail
thanks for sharing
scott
How would I find the expired category ID?
Zhuoling
I want to know where to find Expired voucher ID too.
At meanwhile, I am thinking if there is a way to set function such as:
if a voucher expiry time = 00:00:00, then the voucher should not display, I don’t know how to write a code to work for this, may be someone here can do…
Josh
Hello Zhuoling,
Hover over the expired coupon and check left bottom corner of your screen to view listing/coupon id.Its also displayed just below the coupon title.See attached image
Attachments:
You must be logged in to view attached files.Aaron
Category and Coupon/voucher ID are different.
If you are not going to display the coupon, why not just move it to draft – it’s built into the theme.