Short information about my environment:
- Sitecore 8.2.1
- Sitecore Commerce 8.2.0 (Initial Release)
Hi!
I need to implement a custom condition for promotions. I need to get information regarding the parents of a product (from a shopping cart) in this context. I tried to find the solution and found at least 2 ways to get these data.
- Use CatalogItemBase class like in was proposed in this thread. I tried to use a similar code, but it looks like I don't have this class in my
Sitecore.Commerce.Plugin.Catalog dll
(too old version?).
var source = await this._findEntityPipeline.Run(new FindEntityArgument(typeof(CatalogItemBase), arg.SourceName, false), context) as CatalogItemBase;
- Get SellableItem from the context. I can see all the required products (which are included in the cart), however, they don't have any fields/ components which include information regarding parent items.
Do you know how to get this type of relations? Thank you in advance for the help.