0

I have become the recipient of a Magento code base that is the result of many developers before me who have not had much experience with Magento. Admittedly, I'm new to it myself, but do have an understanding of MVC frameworks and OOP.

In many cases, the files would be duplicated and modified with new code. For example:

/app/design/frontend/default/newtheme/template/catalog/product/view

list.phtml
list_2013_08_06a.phtml
list_2013_09_12a.phtml
...and so on...

This would be fine, if the xml files were still pointing to list.phtml and the other files were simply used as backup, but if I look into...

/app/design/frontend/default/newtheme/layout

... I find that the xml has code will sometimes point to list.phtml and sometimes point to list_2013_08_06a.phtml ... ALSO, sometimes an xml file in the layout could be catalog.xml or it could be catalog_09_10_13.xml because the previous developers knew nothing of source control. (I have since created a git repository for our company.)

So, my question is, how does one determine what files are actually in use with Magento in those folders? I'm trying to prune as I go along, but this code is so extremely bloated that I was hoping for some way of trimming all of the unneeded files.

Any help you can provide would be greatly appreciated!

2 Answers 2

1

Well, there is not an easy answer for what you ask... My advice is to make a fresh install of the same version of Magento used. Afterwards make a diff from the base Magento installation and your project...

The only files i think that are used one time only for installation purpose are the Install module(app/code/core/Mage/Install) and its blocks phtmls in app/design/install

1

You can't. My best idea on this (if you have enough traffic) is somehow make a list of all files and log somehow what files are used.

But I think the "easiest" is to go through the complete code base and clean up. If the code looks like the files, you should think about, starting from a clean magento and only port what you need. This will take weeks to months, but afterwards the code base is clean.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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