From b73db10324b693d2b71bc5a8a51005b6b64a0fd1 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 29 Nov 2024 13:46:17 +0100 Subject: [PATCH] merge, plus nop core add, plus productbox changes --- .../Components/AuctionViewComponent.cs | 2 +- .../Views/PublicInfo.cshtml | 22 ++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) 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(' ' + + '" class="bg-success p-1 text-white text-center" style="position: absolute; width: calc(100% - 1rem); height: 40px; z-index: 1;"> ' + 'LIVE RIGTH NOW' + - ''); + '
' + 'LIVE RIGTH NOW' + - '
' + + resultDate + + '