@model ProductOverviewModel @using Nop.Core @using Nop.Core.Domain.Catalog @using Nop.Core.Domain.Orders @using Nop.Core.Domain.Tax @inject CatalogSettings catalogSettings @inject IWorkContext workContext @{ //prepare "Add to cart" AJAX link var addtocartlink = ""; var shoppingCartTypeId = (int)ShoppingCartType.ShoppingCart; var quantity = 1; if (Model.ProductPrice.ForceRedirectionAfterAddingToCart) { addtocartlink = Url.RouteUrl("AddProductToCart-Catalog", new { productId = Model.Id, shoppingCartTypeId = shoppingCartTypeId, quantity = quantity, forceredirection = Model.ProductPrice.ForceRedirectionAfterAddingToCart }); } else { addtocartlink = Url.RouteUrl("AddProductToCart-Catalog", new { productId = Model.Id, shoppingCartTypeId = shoppingCartTypeId, quantity = quantity }); } var addtowishlistlink = Url.RouteUrl("AddProductToCart-Catalog", new { productId = Model.Id, shoppingCartTypeId = (int)ShoppingCartType.Wishlist, quantity = quantity }); var addtocomparelink = Url.RouteUrl("AddProductToCompare", new { productId = Model.Id }); }
@if (Model.PictureModels.Count > 1) {
@foreach (var picture in Model.PictureModels) { @picture.AlternateText }
} else { var picture = Model.PictureModels.FirstOrDefault(); @picture?.AlternateText }

@Model.Name

@if (catalogSettings.ShowSkuOnCatalogPages && !string.IsNullOrEmpty(Model.Sku)) {
@Model.Sku
} @if (Model.ReviewOverviewModel.AllowCustomerReviews) { var ratingPercent = 0; if (Model.ReviewOverviewModel.TotalReviews != 0) { ratingPercent = ((Model.ReviewOverviewModel.RatingSum * 100) / Model.ReviewOverviewModel.TotalReviews) / 5; }
}
@Html.Raw(Model.ShortDescription)
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductBoxAddinfoBefore, additionalData = Model })
@if (!string.IsNullOrEmpty(Model.ProductPrice.OldPrice)) { @Model.ProductPrice.OldPrice } @Model.ProductPrice.Price @if (Model.ProductPrice.DisplayTaxShippingInfo) { var inclTax = await workContext.GetTaxDisplayTypeAsync() == TaxDisplayType.IncludingTax; //tax info is already included in the price (incl/excl tax). that's why we display only shipping info here //of course, you can modify appropriate locales to include VAT info there @T(inclTax ? "Products.Price.TaxShipping.InclTax" : "Products.Price.TaxShipping.ExclTax", Url.RouteTopicUrl("shippinginfo")) } @if (!string.IsNullOrEmpty(Model.ProductPrice.BasePricePAngV)) {
@Model.ProductPrice.BasePricePAngV
}
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductBoxAddinfoMiddle, additionalData = Model })
@if (!Model.ProductPrice.DisableBuyButton) { var addToCartText = T("ShoppingCart.AddToCart").Text; if (Model.ProductPrice.IsRental) { addToCartText = T("ShoppingCart.Rent").Text; } if (Model.ProductPrice.AvailableForPreOrder) { addToCartText = T("ShoppingCart.PreOrder").Text; } } @if (!Model.ProductPrice.DisableAddToCompareListButton) { } @if (!Model.ProductPrice.DisableWishlistButton) { }
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductBoxAddinfoAfter, additionalData = Model })