@model ProductOverviewModel @using Nop.Core @using Nop.Core.Domain.Catalog @using Nop.Core.Domain.Orders @using Nop.Core.Domain.Tax @using Nop.Services.Configuration @inject IStoreContext storeContext @inject IWorkContext workContext @inject ISettingService settingService @inject CatalogSettings catalogSettings @inject IViewComponentSelector viewComponentSelector @{ //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 }); var storeId = (await storeContext.GetCurrentStoreAsync()).Id; }
@if (viewComponentSelector.SelectComponent("LazyLoadImage") != null) { @await Component.InvokeAsync("LazyLoadImage", new(string Key, string Value)[] { ("src", Model.DefaultPictureModel.ImageUrl), ("alt", Model.DefaultPictureModel.AlternateText), ("title", Model.DefaultPictureModel.Title), ("class", "picture-img") }) } else { @Model.DefaultPictureModel.AlternateText }
@if (!Model.ProductPrice.DisableAddToCompareListButton) { } @if (!Model.ProductPrice.DisableWishlistButton) { }

@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("Widget", 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.RouteUrl("Topic", new { SeName = await Html.GetTopicSeNameAsync("shippinginfo") })) } @if (!string.IsNullOrEmpty(Model.ProductPrice.BasePricePAngV)) {
@Model.ProductPrice.BasePricePAngV
}
@await Component.InvokeAsync("Widget", 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; } }
@await Component.InvokeAsync("Widget", new { widgetZone = PublicWidgetZones.ProductBoxAddinfoAfter, additionalData = Model })