At this stage we did not develop a widget to display cross/up-selling items from Magelia WebStore in an Orchard WebSite. You can however modify the OData request of the “ProductServices” that provides the products data. You simply need to indicate the path
of the related members that you want to load using the “Expand” method.
In the code below, we added .Expand("ProductLinks/LinkedProduct") to load all related products. Depending on what information you want to display on your website, you will probably add other members in the request. For example, if you want to load
the attributes of Linked products you should add the following method call to the request: "Expand("ProductLinks/LinkedProduct/Attributes")".
viewModel.ReferenceProduct = (c.CatalogClient.Products.OfType<ReferenceProduct>() as DataServiceQuery<ReferenceProduct>)
.Expand(rp => rp.Brand)
.Expand(rp => rp.PriceWithLowerQuantity)
.Where(rp => rp.Catalog.Code == viewModel.RequestedCatalogCode && rp.SKU == viewModel.RequestedSKU)
The ViewModel created in this service is available in the "Product" widget as an attribute named “Target”, so that you can have direct access to all related products in the "Parts/Product.cshtml" view.
Here is an example:
var linkedProduct = (this.Model.Target.BaseProduct.ProductLinks as IEnumerable<Object>).Cast<dynamic>().Select(pl => pl.LinkedProduct).ToList();
We hope that we answered your question.
Please do not hesitate if you have any other question.