I'm pretty new to Magento in general and just started working with Magento 2.
Here is my question – How to show prices for all out of stock products?
There is this topic: Magento 2 : How To Show Price of "out of stock" Products
And apparently it works, but half of the instructions don't make sense to me.
After creating custom module, what should I do with it? Should I change anything else anywhere?
Thanks!
Best Answer
You need to create your custom module using below code
Let say module name Custom_Outofstock
So create folder in app/code
Create registration.php file at app/code/Custom/Outofstock/registration.php
Add below code to it:
Create module.xml at app/code/Custom/Outofstock/etc/module.xml
Add below code to it:
Now create file suggested in this answer given By Sohel Rana as below
Create di.xml at app/code/Custom/Outofstock/etc/di.xml
Add below code to it:
Create Price render file FinalPriceBox.php at app/code/Custom/Outofstock/Pricing/Render/FinalPriceBox.php
Add below code to it:
Now run below command to enable module:
Flush cache using below command: