Developer forum

Forum » Development » Best way to handle removing products from a productlist - to maintain paging

Best way to handle removing products from a productlist - to maintain paging

Jan Sangill
Reply

Hi,

I have tried to find a solution, and searched the forum, but am unable to find the best solution to remove products from a productlist - and maintain the paging.

If ProductList.BeforePaging is used it will only remove the product.

What I am trying to accomplish is this:
- if a user meets a certain criteria
- And the product have a special flag on it
then show this product in the list.

I am using indexing to show the products. I tried making an expression in the query - but I cant combine it with a user being of a special type.

What would be the best way to approach this? I must be missing a simple solution, that I cant think off.

Hope someone can assist. 

 


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

You can only do that by putting something in the index and combine it with something on the query - i.e a user macro - and remove the product using an expression in that query using the user macro. Otherwise facets etc. will also be wrong because everything is calculated by the index.

See how another partner has done something like that here:

https://doc.dynamicweb.com/forum/development?ThreadID=81067

Votes for this answer: 1

 

You must be logged in to post in the forum