@model ShoppingCartModel
@using SmartStore.Core.Domain.Orders;
@using SmartStore.Core.Domain.Catalog;
@using SmartStore.Web.Models.ShoppingCart;
@helper SimpleProduct(ShoppingCartModel.ShoppingCartItemModel item)
{
@if (Model.IsEditable)
{
}
@if (Model.ShowSku)
{
@item.Sku
}
@if (Model.ShowProductImages)
{
@if (item.Picture.ImageUrl.HasValue())
{
}
}
@item.ProductName
@if (Model.DisplayShortDesc && !String.IsNullOrEmpty(item.ShortDesc))
{
@item.ShortDesc
}
@if (Model.DisplayBasePrice && !String.IsNullOrEmpty(item.BasePrice))
{
@item.BasePrice
}
@if (Model.DisplayDeliveryTime && item.IsShipEnabled && (!String.IsNullOrEmpty(item.DeliveryTimeName) && !String.IsNullOrEmpty(item.DeliveryTimeHexValue)))
{
@T("Products.DeliveryTime")
@item.DeliveryTimeName
}
@if (!String.IsNullOrEmpty(item.AttributeInfo))
{
@Html.Raw(item.AttributeInfo)
}
@if (!String.IsNullOrEmpty(item.RecurringInfo))
{
@Html.Raw(item.RecurringInfo)
}
@if (!Model.IsEditable && item.IsDownload && item.HasUserAgreement)
{
}
@if (!Model.IsEditable && Model.DisplayEsdRevocationWaiverBox && item.IsEsd)
{
}
@if (item.Warnings.Count > 0)
{
@for (int i = 0; i < item.Warnings.Count; i++)
{
@item.Warnings[i]
}
}
@if (Model.DisplayWeight)
{
@((item.Weight * item.Quantity).ToString("N2")) kg
}
@item.UnitPrice
@if (Model.IsEditable)
{
if (item.AllowedQuantities.Count > 0)
{
@foreach (var qty in item.AllowedQuantities)
{
@qty.Value
}
}
else
{
}
}
else
{
@item.Quantity
}
@item.QuantityUnit
@item.SubTotal
@if (!String.IsNullOrEmpty(item.Discount))
{
@T("ShoppingCart.ItemYouSave"): @item.Discount
}
}
@helper BundleProducts(ShoppingCartModel.ShoppingCartItemModel parentItem)
{
if (parentItem.ChildItems != null)
{
@Html.Widget("order_summary_content_before")
@Html.Partial("_OrderReviewData", Model.OrderReviewData)
@if (Model.DisplayCommentBox && !Model.IsEditable)
{
@Html.Partial("_CommentBox", Model)
}
@if (!Model.IsEditable && Model.NewsLetterSubscription != CheckoutNewsLetterSubscription.None)
{
}
@if (!String.IsNullOrEmpty(Model.CheckoutAttributeInfo))
{
@Html.Raw(Model.CheckoutAttributeInfo)
}
@if (Model.Items.Count > 0)
{
if (Model.Warnings.Count > 0)
{
@for (int i = 0; i < Model.Warnings.Count; i++)
{
@Model.Warnings[i]
}
}
@*we add enctype = "multipart/form-data" because "File upload" attribute control type requries it*@
using (Html.BeginRouteForm("ShoppingCart", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@{
foreach (var item in Model.Items)
{
if (item.ProductType == ProductType.BundledProduct)
{
@SimpleProduct(item)
@BundleProducts(item)
}
else
{
@SimpleProduct(item)
}
}
}
if (Model.IsEditable)
{
@T("ShoppingCart.UpdateCart")
@T("ShoppingCart.ContinueShopping")
}
}
@Html.Widget("order_summary_content_after")
if (Model.IsEditable)
{
@Html.Action("CrossSellProducts", "Product")
}
}
else
{
@T("ShoppingCart.CartIsEmpty")
}
@if (!Model.IsEditable && Model.Items.Any(x => x.IsDownload && x.HasUserAgreement))
{