List discount products

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
ttyy
Posts: 10
Joined: 02 Apr 2021, 16:31

List discount products

Post by ttyy » 02 Apr 2021, 16:34

Hello,

can you help me get a list of all discounted products?
I've looked over the code and the search, it looks i need to rewrite price index to include not just price of the product but perhaps a flag to discount price. Maybe there is a better way to handle the request?

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: List discount products

Post by aimeos » 06 Apr 2021, 08:38

You can also filter for promotion products if you add discounted products as promotion to their categories in the "Categories" sub-panel of the product detail panel of the admin backend. Those products are then displayed in the catalog/lists component using this filter:
https://github.com/aimeos/ai-client-htm ... #L317-L321
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

ttyy
Posts: 10
Joined: 02 Apr 2021, 16:31

Re: List discount products

Post by ttyy » 06 Apr 2021, 11:16

Yes, i saw a promotion option and that works great, but i need discount product via promotion category.
Currently had to implement php filter to remove products w/o discount, but that would be a nightmare with a lot of products.

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: List discount products

Post by aimeos » 07 Apr 2021, 10:24

You can either add a new column to the product manager or use a product property or attribute to flag the product as discounted product. Filtering in the HTML client component (which you have to overwrite) is possible by using all three options.

The product property and attribute requires only the HTML client change, for the first option you need to implement more code:
https://aimeos.org/docs/latest/infrastr ... -managers/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply