Developer forum

Forum » Development » Price Provider, PreparePrices method question

Price Provider, PreparePrices method question

Dmitrij Jazel
Reply

Hello guys,

We have application: 8.4.0.6

It is yet another DW shop, with product field filters, and about 1500 products.

Search index is made automatically every 5 minutes. all goes well.

Except for this method here:

public override void PreparePrices(ProductCollection Products)

        {
            // This overload is invoked when products are rendered.

            if (!Configuration.Global.IsIntegrationActive)
                return;

            ItemInfoHandler.FetchItemInfos(Products);
        }

As I understand when we implement PriceProvider class, he have to ovveride several methods.

PreparePrices is one of them, and incomming parameter "(ProductCollection Products)" is comming somewhere from the DW.

 

Issue is that when we open a page, with first filter, that has 450 products in filter, and page #2 or page #5 for this instance.

ProductCollection Products is still beying populated by all 450 products (that is exactly how much are under the filter option).

But we are requesting just 20 products upder page #2.

 

Can we somehow fix this incomming ProductCollection, and make it so that it would contain only the products that beying requested via filter options and page number?

 

Regards,

Dmitrij

 


Replies

 
Anders Ebdrup
Reply

Hi Dmitrij,

 

I am using the same method for custom price calculation, but do not have this problem. Do you have a filter for price range?

 

Best regards, Anders

 
Dmitrij Jazel
Reply

Hi Anders,

We don't have this problem on other projects, where we are not using filters. But on this particular one, we use custom product field filters.

Regards,

Dmitrij

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
This post has been marked as an answer

Hi Dmitrij,

This should not be the case. You can try to enable Paged queries on your Product Catalog under Advanced searching. If that does not help, I would like a link to the given solution. If you don't want to post it on the forum, you can mail me.

- Jeppe

Votes for this answer: 1

 

You must be logged in to post in the forum