public LiquidAdapter GetCurrentUserCartModel() { _shoppingCartHelper.HandleUserCartWarnings(_workContext.CurrentUser); foreach (var item in _workContext.CurrentUser.ShoppingCartItems) { item.Product.Pictures = item.Product.Pictures.OrderBy(x => x.DisplayOrder).ToList(); } var shoppingCartItemIds = _workContext.CurrentUser.ShoppingCartItems.Select(x => x.Product.Id) .ToList(); return(new UserCartLiquidViewModel { User = _workContext.CurrentUser.AsLiquidAdapted(), ShoppingCartItems = _workContext.CurrentUser.ShoppingCartItems.MapToLiquidVeiwModel(), CrossSellings = GetProductCrossSellings(shoppingCartItemIds), Eshantions = GetProductEshantions(shoppingCartItemIds), TotalPrice = _workContext.CurrentUser.ShoppingCartItems.Select(x => x.Product).Sum(x => x.Price), CouponCodeUsages = _currentUserService.GetUsedCouponCodeUsages() }); }