Get campaign/discount information on product

How do i get information about the active campaign for a product? In earlier versions of Litium, the ProductPriceModel contains a CampaignPriceItem.CampaignSystemId, that is not the case for Litium 8.

Litium version: 8.0.0

If we see the CampaignPriceItem.CampaignSystemId that was existing in earlier versions, the field only represented the campaign that actual was applied, in some cases it was multiple campaign that was applied bet only one of them was included in this field, and the field was not actual representing the possible active campaigns where the product was included in. Example if you have a 3 for 2 campaign this field was only populated with campaign info when you already have put 2 items into the cart.

If we go over to Litium 8 we will have multiple discounts that are connected to product lists for the selection of the products that the discount is eligible for, in this case you can find the connected product lists on the base products for the specified variant and from that find out if the connected product list to any discount. The product list connection and the marker field on the discount are then used to create the presentation marker.

Presentation of markers on products eligible for a discount is not currently implemented in either Litium 8 or in earlier versions.

Ok, looking at a baseProduct the ProductListLinks seems to be deprecated
with the following message:

"Membership of the Base Product in ProductList need to be handled in ProductList. List of linked product lists could be retrieved by calling ProductListService.GetByBaseProduct."

Looking at the ProductListService it doesn’t appear to have any extensionmethods called GetByBaseProduct.

Any chance you can provide an example of how this can be done?


I can see that it have been a typo there, try the ProductListItemService.GetByBaseProduct instead.

I’m not sure i understand how productlists and discounts are connected.
Would this mean that the user would have to create a productlist and select X products. Then
create a discount and connect the same products again?

So let’s say i have a product in both a productlist and a discount. How do i get the discount from the productListItem after i retrieved it using ProductListItemService?