0

My company uses Magento 1.4

There is a folder path

/app/design/frontend/default/mycompanyname/.. etc

In this case, mycompanyname also has "brother" folders (on the same level) which represent some custom extensions we have built that I recognize. [1] This mycompanyname folder only has two subfolders, layout and template

There is ALSO a folder path:

/app/design/frontend/mycompanyname/default

Notice that they are reversed. THIS default folder has the standard etc, layout, locale and template folders in it. Brother folders ALSO include the names of custom extensions I recognize.

The first thing that would come to my Jewish grandfather is probably oy!

My question is: is this really just bad coding, or is there a legit reason why there are both ../mycompany/default/.. and ../default/mycompany/.. in the design folder? If it is bad coding, which of these paths should have been used?

I know that previous programmers really didn't understand the Magento model path concept, or certainly didn't implement it consistently.

[1] NOTE: One of the "brother" folders in the first path is named default - so you've got ../default/default/.. (containing etc, layout, locale, and template), which is also confusing!

  • One further helpful question, what XML/config files would I look at to determine which of these two paths are being used? – Oliver Williams Nov 26 '15 at 14:04
  • Check in your page's source. It will show the locations of CSS files it is using. That same structure will go for the design folder. – Prateek Nov 26 '15 at 14:20
1

First of all, the folder app/design/frontend/default/default is a default Magento version in Magento 1.4, so that's expected to be there.

To know which folder is used for your webshop, you can check the configuration in System > Configuration > General > Design. There is a tab "Package" and a tab "Template". The Magento design folder path has this syntax: app/design/frontend/[package]/[template]. So if it says mycompanyname under the "Package" tab, it will use the /app/design/frontend/mycompanyname/default.

About your question "is this bad programming?", my answer would be "Yes". The easiest and most comprehensive way to have your design/template structure is by using your own package. Extension templates should also never have their own package/template folder. They should always be in app/design/frontend/base/default or app/design/frontend/default/default. So what you want to do here is merge all your files into one package and one template folder. So I'd suggest to move everything to app/design/frontend/mycompanyname/default.

Big chance that merging all files will result in some issues or errors, so you might want to test this properly before placing it on your live environment.

Last but not least, there is one comment I'd like to make: it might be a really good idea to migrate your webshop to the latest version: 1.9. This will solve a lot of security leaks and other issues.

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.