diff --git a/Nop.Plugin.Misc.AuctionPlugin/Components/AuctionViewComponent.cs b/Nop.Plugin.Misc.AuctionPlugin/Components/AuctionViewComponent.cs index a2dbbd8..1e24404 100644 --- a/Nop.Plugin.Misc.AuctionPlugin/Components/AuctionViewComponent.cs +++ b/Nop.Plugin.Misc.AuctionPlugin/Components/AuctionViewComponent.cs @@ -83,7 +83,7 @@ public class AuctionViewComponent : NopViewComponent return Content(string.Empty); } - var productId = ((ProductOverviewModel)additionalData).Id; + var productId = ((ProductDetailsModel)additionalData).Id; //model.ProductId = productId; diff --git a/Nop.Plugin.Misc.AuctionPlugin/Views/PublicInfo.cshtml b/Nop.Plugin.Misc.AuctionPlugin/Views/PublicInfo.cshtml index 99b1498..02ffe84 100644 --- a/Nop.Plugin.Misc.AuctionPlugin/Views/PublicInfo.cshtml +++ b/Nop.Plugin.Misc.AuctionPlugin/Views/PublicInfo.cshtml @@ -47,21 +47,33 @@ if (widgetPriceElements && widgetPriceElements.length > 0) { widgetPriceElements[0].textContent = HUFFormatter.format(productToAuctionDto.currentPrice); // Update the price } + + let myDate = auctionDto.startDateUtc; + console.log("dates: " + myDate); + let fixedDate = new Date(myDate + 'Z'); + console.log("dates: " + myDate + ", " + localizedDate); + let resultDate = new Date(fixedDate); + console.log("dates: " + myDate + ", " + localizedDate + ", " + resultDate); + // Add a new div as the first child if (isActive) { console.log("isActive: " + isActive); productItem.prepend('
' + 'LIVE RIGTH NOW' + - '
' + + resultDate + + '
' + + productToAuctionDto.sortIndex + + ''); } } else {