0

we have a website that is running on Magento 2. This site has been enabled to show out of stock products. Below each out of stock product it displays 'out of stock' how can i change the wording of this to say 'currently out of stock'.

Thanks

1

2 Answers 2

1

If you want to change this text-only for product details page and for that section which you mentioned then you need to copy the following file to your theme:

vendor/magento/module-catalog/view/frontend/templates/product/view/type/default.phtml

Your theme file location will be like below:

app/design/frontend/[Vendor]/[Theme]/Magento_Catalog/templates/product/view/type/default.phtml

And update the text.

php bin/magento setup:static-content:deploy
php bin/magento cache:clean

If my answer helped you, you can accept the answer so it can help others also.

4
  • vendor/magento/module-catalog/view/frontend/templates/product/view/type/default.phtml i cannot find this anywhere?
    – alishagwcd
    Mar 19, 2020 at 14:40
  • Please check this link: prnt.sc/rjfh69 Mar 20, 2020 at 6:25
  • @alishagwcd Have you checked shared link? Mar 20, 2020 at 7:02
  • @alishagwcd If my answer helped you, you can accept the answer so it can help others also. Mar 21, 2020 at 8:10
0

Create the en_US.csv file if not exist in

app/design/frontend/[Vendor]/[Theme]/i18n/

And add the below content.

"Out of stock","Currently out of stock"

Clear the cache and check. This works for me, Check the below screenshots:

Product Page:

enter image description here

Category Page:

enter image description here

10
  • this method hasn't worked for me
    – alishagwcd
    Mar 19, 2020 at 14:37
  • Have you created the same file as in my post? Mar 19, 2020 at 14:38
  • You have to create the file in your active theme. Mar 19, 2020 at 14:39
  • the file was already there in my theme - i am using porto
    – alishagwcd
    Mar 19, 2020 at 14:41
  • Please check if there is already added the Out of stock text you just replace the translated word and if not you have to add at end of the file. Mar 19, 2020 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.