@using Nop.Plugin.Misc.AuctionPlugin.Domains.Enums @using Nop.Web.Framework.TagHelpers.Shared @using System.Globalization @model ProductBidBoxViewModel @* @inject IJsonHelper JsonHelper; *@ @* @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(myObj) as String) *@ @{ if (!Model.IsGuest) { if (Model.FirstProductToAuction != null) { var bgClass = Model.FirstProductToAuction.WinnerCustomerId == Model.CustomerId ? "bg-bidbox-success" : "bg-bidbox"; var bidButtonActive = Model.IsItemActive && (Model.FirstProductToAuction.WinnerCustomerId != Model.CustomerId || Model.IsAdmin); var auctionStatus = Model.FirstProductToAuction.AuctionStatus; var lastBidIsMine = Model.FirstProductToAuction.WinnerCustomerId == Model.CustomerId; var title = auctionStatus switch { AuctionStatus.Sold => lastBidIsMine ? @T("Plugins.Misc.AuctionPlugin.YouWin") : @T("Plugins.Misc.AuctionPlugin.Sold"), AuctionStatus.NotSold => @T("Plugins.Misc.AuctionPlugin.Finished"), _ => lastBidIsMine ? @T("Plugins.Misc.AuctionPlugin.YourBidLeading") : @T("Plugins.Misc.AuctionPlugin.PlaceABid") }; if (Model.WidgetZone.Equals(PublicWidgetZones.ProductDetailsOverviewTop)) {
@*
...
*@
@(string.IsNullOrEmpty(Model.LastProductUrl) ? @T("Plugins.Misc.AuctionPlugin.StartOfList") : @T("Plugins.Misc.AuctionPlugin.BackToLast"))

@(string.IsNullOrEmpty(Model.LastProductName) ? "---" : Model.LastProductName)

}
@*
*@
Item number: @Model.AuctionDto.ProductToAuctionDtos.FirstOrDefault()!.SortIndex
@**@

@title

@*
Base Price: @{ if (Model.WorkingCurrency.CurrencyCode == "EUR") { @($"{((decimal)Model.BasePriceInWorkingCurrency).ToString("C", new CultureInfo("de-DE"))}") } else { @($"{((decimal)Model.BasePrice).ToString("C", new CultureInfo("hu-HU"))}") } }
*@
@{ if (Model.WorkingCurrency.CurrencyCode == "EUR") { @($"{Model.LicitStepInWorkingCurrency.ToString("C", new CultureInfo("de-DE"))}") } else { // @($"{Model.LicitStep:c}") @($"{Model.LicitStep.ToString("C0", new CultureInfo("hu-HU"))}") } }
@* *@
@* *@
if (Model.IsAdmin) {
@*

Manage auction!

*@
} else { //

No access to admin level buttons

} } } else {

This item is under auction!

@T("Plugins.Misc.AuctionPlugin.PleaseLogInOrRegister")

} }