How to set up a Magento theme and keep its source

Launch Magento 1.7.0.2 (latest)

I downloaded the free theme and installed it - no problem.

I want to start making subtle changes, but I don't want to touch the source. I want to make changes to the directory in which they will display and override the base custom theme, but will not be broken if I have to update the free theme, if a newer version is released to you.

My theme is installed at:

.../app/design/frontend/default/the_free_theme/ ../skin/frontend/default/the_free_theme/ 

What directory structure will I create for copying selected files to themes from a custom theme so that they redraw the base file but are not deleted in case of updating?

Thanks for the help.

+4
source share
2 answers

1) In Magento admin: configuration โ†’ design

default: the_free_theme

Now in the skin, templates, and layouts fields, enter "my_new_theme" (or whatever you want to name).

now create new folders:

 .../app/design/frontend/default/my_new_theme/ ../skin/frontend/default/my_new_theme/ 

Any files you want to change are from a template that you copy to a new folder and they will override the base template files, keeping them in tact.

for example, if you want to change the heeader template:

copy ... / app / design / frontend / default / the_free_theme / template / page / html / header.phtml

to ... / app / design / frontend / default / my_new_theme / template / page / html / header.phtml

and then edit the new file. this will override the base template file.

+5
source

I learned how to do this, copy the downloaded theme to the new interface!

1) Do this for both the skin and the design folder ie ... / app / design / frontend / default / my _downloaded_theme / -> ... / app / design / frontend / myinterfacename / default

../skin/frontend/default/my_dowloaded_theme โ†’ ../skin/frontend/myinterfacename/default

interfacename can be anything!

Now create a new theme and location folder (skin && design) in the same parent folder as the new default theme that you just copied.

In this case, I call it the main folder. The structure will look something like this:

.......... / interface / myinterfacename / Primary

So, under the myinterfacename folder, you should see the default folder and the main folder.

2) Log in to the admin and use myinterfacename / main as the default theme ....

this folder is empty, so it will revert to the default myinterfacename, which is the theme you downloaded that you just copied.

Now, for everything you want to change, just copy it by default to the new main folder and change it there.

Good luck !!!

0
source

Source: https://habr.com/ru/post/1435123/


All Articles