Basically I am trying to add structured data such as AggregateRating for products with reviews, Offer – price and priceCurrency, Image(s), SKU, Product name, as JSON-LD code in all products page in magento 2 which would be added as markup to produce google rich search results so I have been referring to https://www.williamscommerce.com/add-rich-snippets-magento-products-using-schema-org-tags/ and https://feedarmy.com/kb/magento-microdata-for-google-shopping/ which I found really relevant. But the issue is I am not able to find this file app/design/frontend/[package]/[theme]/template/catalog/product/view.phtml mentioned in the above references. It would really help me learn this concept better if anyone can drop any suggestions about the file issue mentioned above. Thanks and cheers


Magento relies on a system of file overriding. Themes will inherit from the base Magento theme found in vendor/magento.

If your theme does not specify a app/design/frontend/[package]/[theme]/template/catalog/product/view.phtml file it is likely you will need to find the file in the base Magento theme and copy this to the same path in your active theme to override it (Do not change any code in the Vendor folder). You can then add in the JSON-LD you need to your copied file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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