Hi,
Could someone please clarify how the "Available End Date" on the product variant special prices Nop 2.3 behaves.
if the end date is suppose 7/30/2012, i would expect it to run all day on the 7/30 and expire on 7/31 when its no longer the end date which was set to 7/30/2012
i tried setting up the variant to test it and the behavior is that it doesnt show up on the "end date" which is 7/30 in this example, it expires on 7/29/2012 midnight before it hits 7/30
*argh, could i be any more confusing*
i believe this is the code thats doing it, Nop 2.3/Services/Catalog/ProductService.cs
public virtual IList<ProductVariant> GetProductVariantsByProductId(int productId, bool showHidden = false)
{
//......//
if (!showHidden)
{
//The function 'CurrentUtcDateTime' is not supported by SQL Server Compact.
//That's why we pass the date value
var nowUtc = DateTime.UtcNow;
query = query.Where(pv =>
!pv.AvailableStartDateTimeUtc.HasValue ||
pv.AvailableStartDateTimeUtc <= nowUtc);
query = query.Where(pv =>
!pv.AvailableEndDateTimeUtc.HasValue ||
pv.AvailableEndDateTimeUtc >= nowUtc);
}
//......//
}
which looks like to me, that the product variant should be available including the end date
StartDate <= nowUtc <= EndDate
but it doesn't behave like that