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)


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
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)