Hello Magento Folks,

We are back with a new article of our How To” blog series for Magento 2. At the moment we will learn Magento 2: Show Out of Stock Product Price in Product Detail Page and Category Page. In the last blog article, I have Solved Magento 2: “There has been an error processing your request”.

Quick Intro:

Basically, when any product is out of stock then the price is not displayed on the product detail page and category page. If you desire to display it for the awareness of your customers then you have to apply the below steps. Let’s get started with Magento 2:Show Out of Stock Product Price in Product Detail Page and Category Page. 

Steps to Show Out of Stock Product Price in Product Detail Page and Category Page:

Step 1: Firstly, we will need to create a “di.xml” file inside our extension at the below path.

app\code\Vendor\Extension\etc\di.xml

Step 2: After that, we will need to create a “FinalPriceBox.php” file inside the below folder path of the extension.

app\code\Vendor\Extension\Pricing\Render\FinalPriceBox.php

That’s It.

Conclusion:

Expectantly, you all will have successfully implemented the above solution to show out of stock product price on the product detail page and category page. If you feel any type of difficulties in the implementation of the above solution then let me know in the comments section below. 

Share the solution with your friends.

Happy Reading.

Click to rate this post!
[Total: 6 Average: 5]