@model ProductDetailsModel @using Nop.Core @using Nop.Core.Domain.Catalog @using Nop.Core.Domain.Seo @using Nop.Services.Html @inject IHtmlFormatter htmlFormatter @inject IWebHelper webHelper @inject SeoSettings seoSettings @{ Layout = "_ColumnsOne"; //title NopHtml.AddTitleParts(!string.IsNullOrEmpty(Model.MetaTitle) ? Model.MetaTitle : Model.Name); //meta NopHtml.AddMetaDescriptionParts(Model.MetaDescription); NopHtml.AddMetaKeywordParts(Model.MetaKeywords); //page class NopHtml.AppendPageCssClassParts("html-product-details-page"); //canonical URL if (seoSettings.CanonicalUrlsEnabled) { var productUrl = Url.RouteUrl(new { SeName = Model.SeName }, webHelper.GetCurrentRequestProtocol()).ToLowerInvariant(); NopHtml.AddCanonicalUrlParts(productUrl, seoSettings.QueryStringInCanonicalUrlsEnabled); } //open graph META tags if (seoSettings.OpenGraphMetaTags) { NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); } //Twitter META tags if (seoSettings.TwitterMetaTags) { NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); NopHtml.AddHeadCustomParts(""); } NopHtml.AddJsonLdParts(Model.JsonLd); } @section Breadcrumb { @await Html.PartialAsync("_ProductBreadcrumb", Model.Breadcrumb) } @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsAfterBreadcrumb, additionalData = Model })
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsTop, additionalData = Model })
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsEssentialTop, additionalData = Model })
@await Html.PartialAsync("_Discontinued", Model)

@Model.Name

@if (!string.IsNullOrEmpty(Model.ShortDescription)) {
@Html.Raw(Model.ShortDescription)
} @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsOverviewTop, additionalData = Model }) @await Html.PartialAsync("_ProductReviewOverview", Model.ProductReviewOverview) @await Html.PartialAsync("_ProductManufacturers", Model.ProductManufacturers)
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsInsideOverviewButtonsBefore, additionalData = Model }) @await Html.PartialAsync("_CompareProductsButton", Model) @await Html.PartialAsync("_ProductEmailAFriendButton", Model) @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsInsideOverviewButtonsAfter, additionalData = Model })
@await Html.PartialAsync("_ShareButton", Model) @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsOverviewBottom, additionalData = Model })
@if (!string.IsNullOrEmpty(Model.FullDescription)) {
@Html.Raw(Model.FullDescription)
} @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsEssentialBottom, additionalData = Model })
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsBeforeCollateral, additionalData = Model })
@foreach (var variant in Model.AssociatedProducts) {
@if (!string.IsNullOrWhiteSpace(variant.DefaultPictureModel.ImageUrl)) {
@variant.DefaultPictureModel.AlternateText
}
@if (!string.IsNullOrWhiteSpace(variant.Name)) {
@variant.Name
} @if (!string.IsNullOrWhiteSpace(variant.ShortDescription)) {
@Html.Raw(variant.ShortDescription)
} @await Html.PartialAsync("_Availability", variant) @await Html.PartialAsync("_SKU_Man_GTIN_Ven", variant) @await Html.PartialAsync("_DeliveryInfo", variant) @await Html.PartialAsync("_DownloadSample", variant) @{ var dataDictAttributes = new ViewDataDictionary(ViewData); dataDictAttributes.TemplateInfo.HtmlFieldPrefix = $"attributes_{variant.Id}"; @await Html.PartialAsync("_ProductAttributes", variant, dataDictAttributes) } @{ var dataDictGiftCard = new ViewDataDictionary(ViewData); dataDictGiftCard.TemplateInfo.HtmlFieldPrefix = $"giftcard_{variant.Id}"; @await Html.PartialAsync("_GiftCardInfo", variant.GiftCard, dataDictGiftCard) } @{ var dataDictRental = new ViewDataDictionary(ViewData); dataDictRental.TemplateInfo.HtmlFieldPrefix = $"rental_{variant.Id}"; @await Html.PartialAsync("_RentalInfo", variant, dataDictRental) } @{ var dataDictPrice = new ViewDataDictionary(ViewData); dataDictPrice.TemplateInfo.HtmlFieldPrefix = $"price_{variant.Id}"; @await Html.PartialAsync("_ProductPrice", variant.ProductPrice, dataDictPrice) } @await Html.PartialAsync("_ProductTierPrices", variant.TierPrices) @{ var dataDictAddToCart = new ViewDataDictionary(ViewData); dataDictAddToCart.TemplateInfo.HtmlFieldPrefix = $"addtocart_{variant.Id}"; @await Html.PartialAsync("_AddToCart", variant.AddToCart, dataDictAddToCart) } @{ var dataDictEstimateShipping = new ViewDataDictionary(ViewData); dataDictEstimateShipping.TemplateInfo.HtmlFieldPrefix = $"estimate_shipping_{variant.Id}"; @await Html.PartialAsync("_ProductEstimateShipping", variant.ProductEstimateShipping, dataDictEstimateShipping) } @{ var dataDictAddToWishlist = new ViewDataDictionary(ViewData); dataDictAddToWishlist.TemplateInfo.HtmlFieldPrefix = $"addtocart_{variant.Id}"; @await Html.PartialAsync("_AddToWishlist", variant.AddToCart, dataDictAddToWishlist) }
} @if (!Model.AssociatedProducts.Any()) {
@T("Products.NoAssociatedProducts")
}
@await Html.PartialAsync("_ProductSpecifications", Model.ProductSpecificationModel) @await Html.PartialAsync("_ProductTags", Model.ProductTags)
@*we do not display "also purchased" for grouped products @await Component.InvokeAsync(typeof(ProductsAlsoPurchasedViewComponent), new { productId = Model.Id })*@ @await Component.InvokeAsync(typeof(RelatedProductsViewComponent), new { productId = Model.Id })
@if (Model.ProductReviewOverview.AllowCustomerReviews) { @await Html.PartialAsync("_ProductReviews", Model.ProductReviews) } @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductDetailsBottom, additionalData = Model })