Hello.
I want to be able to display for every order row if there are any campaign prices on that variant.
Ex. oldprice, saved and campaign price.
The campaign is for example going to be buy 3 get the cheapest one for free.
How do I in that case display the campaign price on the variant that the campaign is active for?
Ex. 3 different variants all with the campaign, display the campaign price on the cheapest variant.
Edit:
I’m asking the question because when running the code there are no active campaign on the order row.
And no result using ICampaignPriceCalculator.GetCampaignPrices on the variant.
Litium version: 5
It is only product campaign types that is storing the information on the order row. For the take 3 pay for 2 the discount is added as an order level discount and is not connected to the individual rows but connected to the campaign itself with the campaign id property.
Not sure how performance it will be but you can fetch the campaign, fetching the action and from that see the products that is included. Based on the products that is included you can find the order rows and based on the price you can pick the correct one to show the discount on.
Is only returning prices for product campaign types.
Do you have an example of fetching the action to see the products?
No, sorry I don’t have any example code that will check data in the campaign action and/or conditions.