@model ProductDetailsModel @using SmartStore.Core.Domain.Catalog; @using SmartStore.Web.Models.Catalog; @using SmartStore.Web; @{ Layout = "~/Views/Shared/_Root.cshtml"; Html.AddScriptParts("~/Scripts/public.product-detail.mobile.js"); Html.AddTitleParts(!String.IsNullOrEmpty(Model.MetaTitle) ? Model.MetaTitle : Model.Name); } @helper BundleProducts() { foreach (var item in Model.BundledItems.Where(x => x.BundleItem.Visible)) {
@if (item.VisibleIndividually) { @item.Name } else { @item.Name } @if (item.BundleItem.Quantity > 1) { × @item.BundleItem.Quantity }
@if (!String.IsNullOrWhiteSpace(item.StockAvailability)) {
@T("Products.Availability"): @item.StockAvailability
} @if (!String.IsNullOrWhiteSpace(item.ProductPrice.PriceWithDiscount)) {
@Html.Raw(item.ProductPrice.PriceWithDiscount)
} @if (!String.IsNullOrEmpty(item.AttributeInfo)) {
@Html.Raw(item.AttributeInfo)
} @if (item.ProductVariantAttributes.ShouldBeRendered()) { }
} }
@Html.Widget("mobile_productdetails_top") @*we add enctype = "multipart/form-data" because "File upload" attribute control type requries it*@ @using (Html.BeginRouteForm("Product", new { SeName = Model.SeName }, FormMethod.Post, new { enctype = "multipart/form-data", id = "product-details-form" })) {

@Model.Name

@Html.Raw(Model.ShortDescription)
@Html.Widget("mobile_productdetails_before_pictures") @Html.Widget("mobile_productdetails_after_pictures") @Html.Action("ProductManufacturers", new { productId = Model.Id }) @Html.Action("ReviewOverview", new { id = Model.Id }) @Html.Action("EmailAFriendButton", new { id = Model.Id }) @Html.Action("CompareProductsButton", "Catalog", new { productId = Model.Id })
@if (Model.ProductType == ProductType.BundledProduct) {
@if (Model.RenderBundleTitle()) {

@Model.BundleTitleText

}
@BundleProducts()
@if (Model.BundledItems.Where(x => x.BundleItem.Visible).Count() == 0) {
@T("Products.NoBundledItems")
}
}
@Html.Raw(Html.CollapsedText(Model.FullDescription))
@Html.Partial("_DownloadSample", Model) @Html.Action("ProductTierPrices", new { productId = Model.Id }) @if (Model.ProductType != ProductType.BundledProduct && Model.ProductVariantAttributes.ShouldBeRendered()) { var dataDictAttributes = new ViewDataDictionary(); dataDictAttributes.TemplateInfo.HtmlFieldPrefix = string.Format("attributes_{0}", Model.Id); @Html.Partial("_Attributes", Model.ProductVariantAttributes, dataDictAttributes) } @Html.Partial("_SKU_Man_Stock", Model) @Html.Partial("_BackInStockSubscription", Model) @{ var dataDictGiftCard = new ViewDataDictionary(); dataDictGiftCard.TemplateInfo.HtmlFieldPrefix = string.Format("giftcard_{0}_0", Model.Id); @Html.Partial("_GiftCardInfo", Model.GiftCard, dataDictGiftCard) } @{ var dataDictPrice = new ViewDataDictionary(); dataDictPrice.TemplateInfo.HtmlFieldPrefix = string.Format("price_{0}", Model.Id); @Html.Partial("_Price", Model.ProductPrice, dataDictPrice) } @{ var dataDictAddToCart = new ViewDataDictionary(); dataDictAddToCart.TemplateInfo.HtmlFieldPrefix = string.Format("addtocart_{0}", Model.Id); @Html.Partial("_AddToCart", Model, dataDictAddToCart) }
@Html.Action("ProductSpecifications", new { productId = Model.Id })
@Html.Action("ProductTags", new { productId = Model.Id })
@Html.Action("ProductsAlsoPurchased", new { productId = Model.Id }) @Html.Action("RelatedProducts", new { productId = Model.Id })
} @Html.Widget("mobile_productdetails_bottom")