VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: andorfy on November 26, 2020, 00:30:42 AM

Title: Dynamic discounted category
Post by: andorfy on November 26, 2020, 00:30:42 AM
Hello,

Is there a way to set up a category where all discounted products automatically show up if they are discounted somehow?
In our shop, we use price override for some products, and sometimes rules in the Taxes & Calculation Rules menu, so it is a lot of work to always put in and get out the discounted products to/from a category.

Joomla: 3.9.23
Virtuemart: 3.8.6 10373
PHP: 7.3.6
Title: Re: Dynamic discounted category
Post by: jenkinhill on November 26, 2020, 11:17:55 AM
Set up a category "Discounted" or similar, but do not publish it. When setting discount on a product add that product to your new category (as well as it's existing category).  Then you can filter by discounted category in the backend to see those which have any type of discount.

If you want to show all discounted products in the frontend then publish that category.
Title: Re: Dynamic discounted category
Post by: andorfy on November 26, 2020, 12:01:27 PM
That's the way we do it now if we set a price override directly in the product.
But if we set a rule in Taxes & Calculation Rules it is way more work to add every product which is affected, and this is what I would like to automatize. And if we set a time-limited discount it is easy with the rules, but it really a pain to add the products one-by-one to the category when the discounts start and remove them when it ended.
Title: Re: Dynamic discounted category
Post by: jenkinhill on November 26, 2020, 12:16:44 PM
You can use tax rules per category for applying discounts, too. When setting up a new store most users don't think about what may be needed in the future to hopefully avoid an issue like you now have. Some smart person can probably write code to extract your required detail from the database.
I don't know of any simple way to do it.
Title: Re: Dynamic discounted category
Post by: andorfy on November 26, 2020, 18:02:12 PM
Thank you jenkinhill. Hope someone has other advice or can suggest an extension.