SimplCommerce
SimplCommerce copied to clipboard
ProductWidget with Discount & BestSelling option not list right products
Using ProductWidget was not as expected. pls give me advise.
Fixed for Discount option:
if (model.Setting.OrderBy == ProductWidgetOrderBy.Discount) { query = query.Where(x => x.Price < x.OldPrice).OrderByDescending(x => x.CreatedOn); }
x.OldPrice
could be null so I think you should do
query.Where(x => x.OldPrice.HasValue && x.Price < x.OldPrice.Value).
Thank you. I will try it.
Vào 23:35, Th 6, 26 thg 2, 2021 Tavershima [email protected] đã viết:
x.OldPrice could be null so I think you should do
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/simplcommerce/SimplCommerce/issues/972#issuecomment-786755119, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRDE56MAQ5VGCEUSK2PRZ3TA7EU3ANCNFSM4WOAU2QQ .