Product display - expired categories are also pulled

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Product display - expired categories are also pulled

c.schinzer
All,


I have altered my product display to show "Request Price" when products are
in a certan category.
I am adding a flag when preparing the product display in the related Groovy
script. What I do is walking through the categories that the product has
and if as certain naming pattern is matched, I set the flag to not render
the price but rather display a "Please request our price".

Well, having said that, so far I have only added products to the
"PriceOnRequest" category, but now I also need to remove some.
I thought it is enough to "expire" the product from the category, but
apparently. the groovy script does fetch all categories, regardless whether
the product is activated in them or expired.

Now my question is:
* is this intended behaviour (I do not expect so). If not so, I shall also
open a JIRA issue about this
* is there any way in the groovy script to make the delegator aware that
only active categories should be fetched?
( the current call looks like
delegator.findByAndCache("ProductCategoryMember". [productId : productId])

Any directions welcome.

Thanks & regards

Carsten
Reply | Threaded
Open this post in threaded view
|

Re: Product display - expired categories are also pulled

parimal gain-2
Hi,
You can use filterByDate() method of class EntityUtil.