I want to override magento’s core order/info.phtml
.
I have copied the file from
vendor/magento/module-sales/view/frontend/templates/order/info.phtml
and place it here
app/design/frontend/Magento/luma/Magento_Sales/templates/order/info.phtml
But it is still using the old phtml
file instead of new overrided file, please tell me where I did wrong?
I am using magento’s default theme Magento/luma
2
Answers
You can’t override files from the Luma theme like this. And you shouldn’t, because you are attempting to hack the Luma theme, while its files are located elsewhere. Plus, it is a demo theme, not meant to create new production shops with.
Instead, try to create a new theme under
app/design/frontend
, add a propertheme.xml
andregistration.php
. Next, configure that theme from within your backend. And then try to override files there.You can override luma theme but you should have your own theme name and you have to set parent theme as luma so their properties can be overridden from your custom theme.
Hope you know how to create custom theme , if not see the below steps try the same.
Create a folder inside app/design/frontend/Vendorname/themename
Example : Create vendor name as Test
Theme name as : mytheme
Now you need to create 3 files
Inside theme.xml you can set the parent as luma like this
Once this is done you need to activate your theme from admin end and here you can override anything inside it.
Once you activate your custom theme copy the sales folder this way
and do your changes inside it , you can see your changes in frontend.