Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Coupon discount – can I exclude a single category
Tagged: Coupons, exclude category, product categories
- This topic has 4 replies, 3 voices, and was last updated 13 years, 3 months ago by gamehermit.
-
AuthorPosts
-
July 11, 2011 at 12:46 pm #3749happycatMember
I want to offer a discount – enter the word eleven, and get 11% off your order – and I want to exclude 1 specific category. Is there a way to do this? We are limited in the choices for coupon conditions.
If I could set a “Category ID Not Equal To…” so as that the coupon is for everything BUT this one category.
I could then make an “Excluded from discount” category, and put all items not part of the coupon in it, and they can be mixed in the same cart at checkout as the discounted items.
It would also be nice if in the Coupon arguments we could put in a non contiguous array of Item or Category ID’s.
July 12, 2011 at 3:13 am #34192amin007ParticipantAdding a “Not equal to” logic is not very trivial. This will add significant amount of coding to the plugin which I try to resist in order to keep the plugin lightweight. The easiest way to get a similar effect of “Not equal to” logic is to introduce another “category” that encompasses all your products except the ones you don’t want to include in the “not equal to” condition. Remember, you can assign multiple categories to your products. So creating another category and assigning it to products just for coupon condition purpose is completely valid and does not alter any other functionality that you currently have in place.
August 1, 2011 at 3:12 am #34193gamehermitMemberHi Ruhul…I think this might be a good work around for me too.
So If I have these categories and want to exclude Category C from the coupon:
Category A
Category B
Category C
I could create Category D and add all the products from A & B (excluding C) then apply the coupon to Product Category D only? Basically we want to provide a .49 discount to all of our single downloads but exclude our bundles (Category C).
Two Questions:
Is there a way to keep the new Category D from being displayed on the [wp_eStore_list_categories count=true] short code? I just don’t want to confuse the customers.
Lastly, we have just under 600 products…what is the quickest way to add all the products to the new additional category?
Thanks,
Jack
August 2, 2011 at 12:06 am #34194amin007ParticipantYes you are right.
I can add an additional parameter for that shortcode which will allow you to specify an “exclude” list.
The quickest way is to modify the values in the database. There is a table called category relations table. It is a simple table with product and category IDs. You can create a CSV file then import it into that table. This article should help:
August 2, 2011 at 1:00 am #34195gamehermitMemberYep…PHPMyAdmin made adding the products to the category super easy! Now I just have to figure out my coupon woes
Thanks,
Jack
-
AuthorPosts
- You must be logged in to reply to this topic.