VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: serge-web54 on January 14, 2025, 14:56:46 PM

Title: coupon not for discount products
Post by: serge-web54 on January 14, 2025, 14:56:46 PM
hello, I have a coupon that works fine
But we want the customer not to be allowed to use it on discount products
How to do that ?
( i tried a category promotion but the product is already in an allowed category so this does not work)
Title: Re: coupon not for discount products
Post by: hazael on January 15, 2025, 11:04:34 AM
This is a primitive solution, but you can add all your discounted products to an additional hidden category for which you can create a rule to exclude this voucher.

If Milbo at Virtuemart created tags like those in the com_content component and if rules could be created for these tags, I would finally love this virtuemart 100%. Unfortunately, such a change will never happen - so instead of tags you have to create hundreds of absurd categories just to create rules ;-)

PS. If you know the basics of JavaScript and PHP, you can create a simple rule to detect discounts directly in the shopping cart. if a discount is detected, the voucher will not be accepted and a system message about this event will appear
Title: Re: coupon not for discount products
Post by: radosc on January 15, 2025, 11:36:31 AM
Quote from: serge-web54 on January 14, 2025, 14:56:46 PMhello, I have a coupon that works fine
But we want the customer not to be allowed to use it on discount products
How to do that ?
( i tried a category promotion but the product is already in an allowed category so this does not work)

Please consider using the AwoCoupon component. I have been using it for years, and it has solved many problems for me. It includes an option that addresses the issue you mentioned in your question.
Title: Re: coupon not for discount products
Post by: serge-web54 on January 15, 2025, 15:43:41 PM
Quote from: hazael on January 15, 2025, 11:04:34 AMThis is a primitive solution, but you can add all your discounted products to an additional hidden category for which you can create a rule to exclude this voucher.


I can not exclude category, just include
So : if I do so , I have to keep promoted products in their original category also, and then the system allows them
Title: Re: coupon not for discount products
Post by: hazael on January 15, 2025, 23:17:17 PM
You're right - I didn't pay attention to it - there are just "Allowed Product Categories"! LOL
These rules are very strange - but this is not surprising - if you build a component with several products in the store in mind :D

Title: Re: coupon not for discount products
Post by: serge-web54 on January 16, 2025, 09:34:31 AM
we found an alternative solution :
selected all the products to be allowed and delete those which are promoted.
every month, when creating the promotion, the admin will do the changes in the settings.