Question

when i enable "Allow Alert When Product Comes Back in Stock" on magneto admin backend and it shows "Notify me when this product is in stock" on product page. I want to edit the product alert text on front but how? i have no idea, please help!

enter image description here

No correct solution

OTHER TIPS

You can turn on your Template Path Hints and see which file it is.

Check this link: https://docs.magento.com/user-guide/system/template-path-hints.html

And when you are editing you should follow Magento's best practice.

Template customization walkthrough

To customize a template:

  1. Locate the template which is associated with the page/block you want to change using template hints.

  2. Copy the template to your theme folder according to the template storing convention.

  3. Make the required changes.

To add a new template in a theme:

  1. Add a template in your theme directory according to the template storing convention.

  2. Assign your template to a block in the corresponding layout file.

Ref: https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/templates/template-walkthrough.html

Override vendor/magento/module-product-alert/view/frontend/layout/catalog_product_view.xml to your theme and change the setSignupLabel in productalert.stock block

Actually there's another easier way which is Inline Translate.

Translating is simply just changing 1 text to another.

You can use Inline Translate or Translate using the i18n folder that Magento provided.

More information can be found here: https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/translations/xlate.html

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top