Question

I'm trying to customize the order detail page that the customer see in his/her account.

What I did is that I copied:

vendor/magento/module-sales/view/frontend/templates/order/view.phtml

Into:

app/design/frontend/CompanyName/ThemeName/Magento_Sales/view/frontend/templates/order/view.phtml

And added some test modifications in there but nothing showed up on the website and it continues to use the original view.phtml

I tried clearing all cache and deploying static content with no luck.

When I enable Template Path Hints for Storefront in the admin and access the order details page, it's still showing that it's using the original view.phtml and not the customized one

Can you please help me with this problem?

Was it helpful?

Solution

When overriding templates your files should be in :

app/design/frontend/CompanyName/ThemeName/Magento_Sales/templates/order/view.phtml

you should not add view/frontend/ folders. All your templates should be in

app/design/frontend/CompanyName/ThemeName/Magento_Sales/templates/

OTHER TIPS

It always suggested that we must inherit the patent theme if it is created than you must work in child themes or if it is not created WE MUST CREATE a child them

To inherit the parent or Magento core theme follow Theme inheritance .

Once we go through the above document we can customize any page.Rule appies to all the phtml files.

You already know how to debug as mentioned that you found the path still i am sharing this link How to debug the theme

Magento 2 Basic layouts

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