Forums / Setup & design / Fetching products with discount

Fetching products with discount

Author Message

Nicolas OTTAVI

Friday 06 January 2006 2:36:21 am

Hi there,

In order to display in a specific toolbar products with have a discount I looking a way to fetch products with a discount. How would you do this ?

Thanks for your help,
C.

Mads Ovesen

Friday 06 January 2006 6:02:49 am

Maybe the most easy way to do this, is to fetch all products that has a price with discount. $object.data_map.price.has_discount returns true if the price (and product) has a discount and false otherwise.

/m

Nicolas OTTAVI

Friday 06 January 2006 6:43:12 am

Hi Mads,

This is how I did (this doesn't look nice to me ...)

I do a fetch on all the products.
Then I do a foreach and display only if data_map.price.content.has_discount ...

That's not fine. The best would be to do a fetch with an extended filter I think. I will try to do so. I will keep you updated.

Thanks,
C.

H-Works Agency

Thursday 14 June 2007 4:50:34 am

Did you find a way to do this with "extended_filter" ?

Thanx

EZP is Great