Magento – Magento 2 – product final price issue

catalog-price-rulesmagento2price

If I try to print price and final_price from $_product in category page template (product/list.phtml), they have the same value despite the product is affected by a catalog rule.
Why?

How can I get the discounted price in there?

Best Answer

Make sure your price indexes (actually all your indexes) are up to date.
The prices in the product list don't come directly from the product entity. They come from the table catalog_product_index_price where the indexed prices are kept.
If you have a discount rule that you just created but you did not rebuild the indexes you won't see the proper prices in the list.
This does not apply to the product view page because here the prices come from the product entity directly.

Related Topic