- Moderator
- 1044
Help make Nop-Templates products better. Share your ideas or feature requests related to the Nop Emporium Theme for nopCommerce.
@model ProductDetailsModel
@using Nop.Services.Localization
@inject ILocalizationService localizationService
@if (!string.IsNullOrWhiteSpace(Model.StockAvailability) || Model.DisplayBackInStockSubscription)
{
<div class="availability">
@if (!string.IsNullOrWhiteSpace(Model.StockAvailability))
{
bool outOfStock = string.Equals(localizationService.GetResource("products.availability.outofstock"), Model.StockAvailability, StringComparison.InvariantCulture);
string stockClass = "is-in-stock";
if (outOfStock)
{
stockClass = "is-out-of-stock";
}
<div class="stocking @stockClass">
<span class="label">@T("Products.Availability"):</span>
<span class="value" id="stock-availability-value[email protected]">@Model.StockAvailability</span>
</div>
}
@await Html.PartialAsync("_BackInStockSubscription", Model)
</div>
}
@model ProductDetailsModel
@using Nop.Services.Localization
@inject ILocalizationService localizationService
@if (!string.IsNullOrWhiteSpace(Model.StockAvailability) || Model.DisplayBackInStockSubscription)
{
<div class="availability">
@if (!string.IsNullOrWhiteSpace(Model.StockAvailability))
{
bool outOfStock = string.Equals(localizationService.GetResource("products.availability.outofstock"), Model.StockAvailability, StringComparison.InvariantCulture);
string stockClass = "is-in-stock";
if (outOfStock)
{
stockClass = "is-out-of-stock";
}
<div class="stocking @stockClass">
<span class="label">@T("Products.Availability"):</span>
<span class="value" id="stock-availability-value[email protected]">@Model.StockAvailability</span>
</div>
}
@await Html.PartialAsync("_BackInStockSubscription", Model)
</div>
}
.is-in-stock {
color: green;
}
.is-out-of-stock {
color: red;
}
.is-in-stock {
color: green;
}
.is-out-of-stock {
color: red;
}
.is-in-stock {
color: green;
font-size: 18px;
font-weight: bold;
}
.is-out-of-stock {
color: red;
font-size: 18px;
font-weight: bold;
}