Posted: March 13, 2019 at 9:53 AM Quote #224993
Dear Team,

I would suggest to update the model.DisplayDiscontinuedMessage one more time after the PrepareProductPriceModel(product)

like:


//price
model.ProductPrice = PrepareProductPriceModel(product);
model.DisplayDiscontinuedMessage = !product.Published && _catalogSettings.DisplayDiscontinuedMessageForUnpublishedProducts;


For example, we update prices every hour (from 3rd party API) and for that we overridden the GetFinalPrice in our Plugin.

If a product was unPublished and the new price switches the product to Published state user still see the "Products.Discontinued" message until another page refresh.


Thank you
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)