开发者

Does magento touch theme folders during updates

开发者 https://www.devze.com 2023-04-11 13:34 出处:网络
I am working on a Magento project and it is due an update; so I am wondering which folders will it replace/affect during an update. I am used to working with wordpress which leaves the entire \'wp-con

I am working on a Magento project and it is due an update; so I am wondering which folders will it replace/affect during an update. I am used to working with wordpress which leaves the entire 'wp-content' folder ( all the user data ) untouched during an update - I presume magento does something similar and doesnt overwrite custom theme files开发者_JS百科, media uploads (and hopefully not products and user data anyway) but then I read the following from this page which confuses me

For several of the first Magento themes I built, I copied the layout files from the default or blank theme into the custom theme layout folder. I would then modify the layout files directly, editing or commenting out content in files like: catalog.xml, page.xml, checkout.xml, etc… I never liked editing these files directly, as I knew that when it came time to upgrade to a newer version of Magento that had upgraded the layout files, I’d have to merge the changes into the new layout files.

I think I may just have a mistunderstanding specifically about layout files but all the same could someone clarify for me which locations (if any) that I might expect to loose data from during an update ( so that hopefully I can avoid using these locations )


You won't loose any data if you have made your edits in custom theme package/folder and not in core code (but in tyour own extensions and code/local code-pool). However as you mentioned yourself it would be wise to merge your theme to be based on new layout files and same goes for template files as well

you can use a diff tool for that that can compare entire folder structures (winmerge, things and so on) and compare your theme and base theme folders

lets clarify things

  • whatever you change in code do it by making extensions in app/code/local/ or app/code/community
  • by merging your theme based on = if new version of magento is available and your theme is based on old version layout files and templates eq you have copied layouts and templates and modified them then it is wise to compare all changed files against new ones and apply your changes on top of new layout and template files
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号