Add campaign data to PriceAgent feed

I Would like to add more properties to the PriceAgentItemResult that I can use in my custom feed.
First I would like to add a bool that says if the product is in a campaign or not.
And then I would like to add a property if the product has a campaign price. So I would like both the regular price and the campaign price.

Is this possible?

Litium version: 6.3.4

There’s a .Properties dictionary you could add your values to or create your own implementation of PriceAgentItemResult and cast to it in your own factory. You can use ICampaignPriceCalculator and the IPriceCalculator to get the information you need.

Hm ok. I know the properties adding. But I need to see if the product is in any campaign (even though it’s no difference to the price)

Is that possible with the ICampaignPriceCalculator and if so, how?
We want to refresh this feed at every 4th hour, so my concern is also the overall performance on the site.

This feed is going to be used with a search engine

Try with CampaignDataHolder class to get the campaigns:

And the overall performance on site depends on how many products the website has so best is to implement and check with a timer how long it takes every time to begins with.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.