Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @foreach (ILineItem item in Model.Items.Where(x => x.LineItemType == LineItemType.Product))
- {
- Merchello.Web.Models.ContentEditing.ProductDisplay productDisplay = merchelloHelper.Query.Product.GetBySku(item.Sku);
- Merchello.Web.Models.ContentEditing.ProductVariantDisplay productVariantDisplay = null;
- Merchello.Web.Models.VirtualContent.IProductContent myProduct = null;
- if(productDisplay != null)
- {
- myProduct = merchelloHelper.TypedProductContent(productDisplay.Key);
- }
- else
- {
- productVariantDisplay = merchelloHelper.Query.Product.GetProductVariantBySku(item.Sku);
- myProduct = merchelloHelper.TypedProductContent(productVariantDisplay.Key);
- }
- var product = myProduct;
- IPublishedContent image = null;
- if (product.HasValue("image"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement