Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / need help with override system, please

need help with override system, please

Views: 7,542

Results 1 to 20 of 31
15 Apr 2007, 3:54 PM
#1
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

need help with override system, please

Hi all,

well I guess my question is a bit too late, but I didnt know exactly what override system is for.
Reading about it I feel I messed something up.

I had a person working on a design for my site and I got everything fine.

After finishing the design I started to make some changes of course...
I found two folders in includes/templates which are CLASSIC and TEMPLATE_DEFAULT.

I made changes in CLASSIC and all other folders like languages etc...

I am not sure whether I understood right, but was I supposed to create another template folder called like MY_TEMPLATE and make all the changes there without touching the CLASSIC one?

If so....well I havent done this and I hope that I didnt messed too much and that there is still a way to get this fixed before the next version of Zencart comes out...

CAn anyone please help me on that or advice what to do?

Thank you very much.

Best regards,
Kruna

15 Apr 2007, 4:08 PM
#2
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: need help with override system, please

The tutorials/FAQ section can be your best friend! There you can find specfic answers to specific questions that explain things in a much more concise way then I could.

Here are two very informative FAQ's that speak directly to your situation:
https://www.zen-cart.com/tutorials/index.php?article=36

https://www.zen-cart.com/tutorials/index.php?article=230

Good luck!!

Tim

15 Apr 2007, 4:17 PM
#3
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

Re: need help with override system, please

Thank you very much for answering and help.

I was afraid that I did it wrong.
I read the tutorials/FAQ but I am not sure whether I understood everything 100%, so I wouldnt like to mess up something.

I would need help on that like chatting with somebody who knows about it and then going through this step by step.

Anyway I will go through the tutorials/FAQ and try it, maybe I am just complicating too much and in fact it is easier than I think....

Best regards,
Kruna

16 Apr 2007, 3:34 AM
#4
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: need help with override system, please

To create a very basic custom template (you can build from there), you need:
includes/languages/YOUR_TEMPLATE/english.php
includes/languages/english/YOUR_TEMPLATE/index.php
includes/languages/english/YOUR_TEMPLATE/header.php (to change the logo)
includes/templates/YOUR_TEMPLATE/template_info.php
includes/templates/YOUR_TEMPLATE/common/tpl_header.php
includes/templates/YOUR_TEMPLATE/common/tpl_footer.php
includes/templates/YOUR_TEMPLATE/images/logo.gif
includes/templates/YOUR_TEMPLATE/css/stylesheet.css

Any where you see a /classic/ folder, you can create a folder for your custom template. Copy the files you need from /classic/, /template_default/ or the parent directory.

Edit includes/templates/YOUR_TEMPLATE/template_info.php to give your template identifying info (you'll understand when you open the file).

Always use a text editor like Notepad or Crimson Editor to edit php files.

Once you've built your template, go into your admin under tools->template selection and select it from the pull down menu.

If you edit the files in /classic/ or /template_default/, all your changes will be lost with the next upgrade/update.

16 Apr 2007, 1:38 PM
#5
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

Re: need help with override system, please

Hi,

Thank you very much for your replies.

In deed it is not that difficult as I thought...

I almost did it, somehow MY_TEMPLATE isnt complete, but I gues this is due to problems when transfering the files to the server, I had some connection problems.
I will try it again today and see if I have better luck...

Best regards,
Kruna

16 Apr 2007, 2:02 PM
#6
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: need help with override system, please

Whenever possible I try to recommend only open source web tools. However, in regards to your comment about getting a clean transfer of files, I must recommend the FTP that I use: FlashFXP.

I went through quite a few FTP programs and was always sorely disappointed before stumbling upon FlashFXP. You can try it free for a month or two and then it was a very inexpensive one-time cost. I can't say enough about how consistently able it is to do the job quickly, cleanly and efficiently.

Good luck! Tim

16 Apr 2007, 2:10 PM
#7
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

Re: need help with override system, please

Thank you for the tip...

I am using Filezilla, which is fine I guess, it has been working fine, but recently I have some problem with it. I guess one reason is taht I use Vista and that the are compability problems too.
Although the website from Filezilla says it works fine with Vista, but I am experiencing something else.
And as I said before the internet connection sometmes is (/@@@%&)/$%$(&%$)(/@@%$/($(%/$.

Ok basically I have it done now :clap: , BUT the sideboxes are missing...did I missed something??

THanks for help.

Bets regards,
Kruna

16 Apr 2007, 3:05 PM
#8
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

Re: need help with override system, please

YES...I missed something....I didnt configure the sideboxes in admin/side boxes controller...
Now everything works fine...:clap:

Thank you very much for all the good tips...

Best regards,
Kruna

16 Apr 2007, 8:27 PM
#9
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: need help with override system, please

I feel rather stupid:S

I tried to follow the faq (both articles)
And i tried it before but I do something wrong every time I try.
:blush:
I created this
/webshop/includes/templates/CUSTOM/templates/

to override
tpl_modules_create_account.php

But I see nothing happen.

Dod I need to do anything else?
I tried CUSTOM and custom and searched for a place to enter the folder namen 'custom' in the admin settings

Help please. I feel so stupid:S

17 Apr 2007, 3:09 AM
#10
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

Re: need help with override system, please

You dont have to feel stupid at all, you are not.

I am sorry...I cant tell you what you did wrong, but I can tell you what I did and this may help you (and hopefully I did it right too:blink: )....

  1. I opened with Filezilla
    public_hmtl/my_shop/includes/templates
    There you can see two folders called classic and default_template, right?

I added/created another folder called my_shop and had three folders at the end: classic, my_shop and template_default

  1. I opened the classic folder, put/dragged ALL its content in a folder xxx on my hard drive (C:).

  2. All the content in folder xxx on my hard drive (C:) I dragged it back to the server but this time into the folder my_shop, it is like copying it.

Another folder:

includes/languages

there you can see the following folders:

classic, english ( and other language(s) in my case I also have a spanish folder) and above these folders you can see php files like
english.php etc.

Again I added/created another folder called my_shop and had it included, followed point 3. again etc...

I did this with every folder where I found the folder classic, (there are not that much, e.g., please take a look at
http://www.zen-cart.com/forum/showthread.php?t=63256&highlight=override+system
This thread also helped me a bit to understand what this override is all about, especially comments from swguy and Dr. Byte on first side.)

At the end I dragged the template_info.php to my hard drive, opened it with an editor, in the line where it says

$template_name = 'Classic Contemporary Green'
I changed to
$template_name = 'my_shop'

saved it, dragged back to folder

public_hmtl/my_shop/includes/templates/my_shop

and DONE!!!!

The when you enter your admin store you go to tools/template selection

There you can chose YOUR my_shop template.....hopefully...!!

and I hope I didnt explain too complicated :blush: , if so, please feel free to ask...

Regards,
Kruna

17 Apr 2007, 3:18 AM
#11
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

Re: need help with override system, please

Sorry...maybe a dump question, but where is

tpl_modules_create_account.php??:blink:

Regards,
Kruna

17 Apr 2007, 12:18 PM
#12
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: need help with override system, please

Hi Kruna,

I cannot say from here.
I can only see that tomorrow when I am back home.

17 Apr 2007, 12:22 PM
#13
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: need help with override system, please

So Do I understand it right that:

First I have to crate a template folder with a copy of the template I am going to use. (i call that folder MYTEMP)
now in the administrato I select MYTEMP as the template.

and from that moment on all other override folders with the foldername MYTEMP wil be checked for updated files?

Am I correct this is the way to initialize the templae override system?

Greets Bert

17 Apr 2007, 1:14 PM
#14
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: need help with override system, please

Yes, you have to create your own custom template if you want to make changes.

No, the overrides aren't checked automatically for changes in new versions of ZC. You have to do that yourself. The easiest way is to use a program like WinMerge or Beyond Compare to compare the files in your custom template folders with the new versions.

17 Apr 2007, 3:45 PM
#15
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: need help with override system, please

Hi Afo,

Sorry maybee I was not to clear due to the language
:blush:

Maybee I must keep it simple:

say i just want to change 1 file in folder
webshop/includes/languages/dutch
and the file I want to change is: create_account.php
Offcourse I want to use the override system:)
Now
in the folder webshop/includes/languages I create a folder 'CUSTOM'?
and a sub folder dutch in that folder?
I copy the file
create_account.php to that folder?

That is what I had tried so far
Now how does zencart know it has to look in the cusom folder that I just created to use the file I changed?
I guess there is some place where I must tell what the name of my custom folder is?

17 Apr 2007, 4:28 PM
#16
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: need help with override system, please

Kruna:

Sorry...maybe a dump question, but where is

tpl_modules_create_account.php??:blink:

Regards,
Kruna

The easiest way to find something that exists within your shop is to use the Developers Tool Kit.

In your admin go to admin/tools/ and select Developers Tool Kit from the drop down list.
Scroll to the bottom of the page.
Under "Look-up in all files" paste in tpl_modules_create_account.php.
Under "All Files Look-ups:" select "All Files: Catalog/Admin"
Hit the search button. It will bring up the location of all instances of your page within your admin. This works for pages, terms, keywords etc. and is a real time saver!

Good luck!

Tim

18 Apr 2007, 3:10 AM
#17
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: need help with override system, please

Have you taken a look at the Dutch Language Pack that's available in the downloads section?

18 Apr 2007, 5:43 AM
#18
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: need help with override system, please

Hi ,

@ afo Yes I hace that installed offcourse.

I just took that file an example
I still do not know /understand what I must do before I can get the override active That is why I now gave this example.
I have seenn many posts of people ending with this question on the forum but there was no where an answer. Is this some insider secret?

Where do I tell zencart the name of the folder I use for overrides?

19 Apr 2007, 3:30 AM
#19
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: need help with override system, please

When you create a template, you can select it in the admin under tools->template selection

19 Apr 2007, 4:05 AM
#20
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

Re: need help with override system, please

Hi mrbert...

say i just want to change 1 file in folder
webshop/includes/languages/dutch
and the file I want to change is: create_account.php
Offcourse I want to use the override system:)
Now
in the folder webshop/includes/languages I create a folder 'CUSTOM'?
and a sub folder dutch in that folder?
I copy the file
create_account.php to that folder?

You dont have to change/override the create_account.php.
What you have to do is following:
or let me ask you otherwise....what kind of folders and files do you see in

webshop/includes/languages?

Regards,
Kruna