How do I modify the contents of {{var alertGrid | raw}} in the template?
The full content of the mentioned variable is located in the following file:
/vendor/magento/module-product-alert/view/frontend/templates/email/stock.phtml
It is better to edit the mentioned file via the theme folder. For that, the file should be created in this path:
app/design/frontend/<VendorName>/<ThemeName>/Magento_ProductAlert/templates/email/stock.phtml
The created file can be used for editing the {{var alertGrid | raw}} variable.
If your theme is installed in the vendor folder, it won't be possible to redefine files via the app/design folder.
Related Articles
I'd like to modify the text of an email template. How can I do it?
In order to edit the email, please go to Marketing → Email Templates and create a new template. To associate the new template with the back-in-stock alerts, you'd need to load the existing template. Please select Magento_ProductAlert → Stock Alert ...
Can I subscribe to an out of stock simple product (child of a configurable)?
Yes, the extension allows customers to subscribe to back-in-stock notifications to specific options of a configurable product. Please ensure to enable the Show Options of Out of Stock Configurable setting in the module general configuration (Stores → ...
Is it possible to hide the out of stock subscription block for specific products?
Yes, there's an option to hide the stock alert block for particular products. To achieve that, follow the steps below. Step 1. Navigate to Catalog → Products. Step 2. Pick the product you wish to hide the Stock Alert block for and open its ...
Do customers need to re-subscribe to a product if it is out of stock again?
When customers subscribe to stock notifications for a certain product, only one email will be sent when this item is back in stock. If the product is out of stock again, customers will need to resubscribe to stock notifications to receive another ...
Stock alert block is not displayed on the frontend. What might cause the issue?
Foremost, ensure that the Hide Stock Alert Block setting is disabled for your products. To check this, go to Catalog → Products, select a product, and find the Hide Stock Alert Block setting. If necessary, change it to No, clear the caches, and then ...