Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / English.php won't override?

English.php won't override?

Locked

Views: 6,632

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
16 May 2006, 11:07 AM
#1
pauls avatar

pauls

Zen Follower

Join Date:
Feb 2006
Location:
UK
Posts:
300
Plugin Contributions:
0

English.php won't override?

/includes/languages/english.php

Wait my bad!

I wish we could delete posts ... !

27 May 2006, 6:44 AM
#2
wils avatar

wils

Zen Follower

Join Date:
Apr 2006
Location:
Göteborg
Posts:
124
Plugin Contributions:
0

Re: English.php won't override?

Having the same issue:

/includes/languages/Swedish.php is copied to

/includes/languages/custom_templ/Swedish.php

If both files exist: I get:

Fatal error: Cannot redeclare zen_date_raw() (previously declared in \includes\languages\custom_templ\Swedish.php:58) in \includes\languages\Swedish.php on line 58

If I use the override file only:

Warning: main(includes/languages/Swedish.php): failed to open stream: No such file or directory in \includes\init_includes\init_templates.php on line 72 etc etc

??

27 May 2006, 10:10 PM
#3
wils avatar

wils

Zen Follower

Join Date:
Apr 2006
Location:
Göteborg
Posts:
124
Plugin Contributions:
0

Re: English.php won't override?

Resolved on my part, unknown issue in swedish.php file. When getting rid of some old definitions it worked again.

28 May 2006, 12:29 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: English.php won't override?

Pauls:

/includes/languages/english.php

Wait my bad!

I wish we could delete posts ... !

When you find your own solution ... post it so that it can help others ... :smile:

29 May 2006, 3:03 PM
#5
pauls avatar

pauls

Zen Follower

Join Date:
Feb 2006
Location:
UK
Posts:
300
Plugin Contributions:
0

Re: English.php won't override?

Ajeh:

When you find your own solution ... post it so that it can help others ... :smile:

Hehehe Linda, now you know I always do this, however in this case I had already fixed whatever it was I was concerned with, or the post had nothing to do with the error I was having. Therefore, I wanted to delete this post as it wasn't relevant.

One really should be able to delete a post one creates, unless other people have started to post replies ... which wasn't the case here, you can see I was the next person to post, and I would have deleted this post then. :bigups:

29 May 2006, 3:55 PM
#6
wils avatar

wils

Zen Follower

Join Date:
Apr 2006
Location:
Göteborg
Posts:
124
Plugin Contributions:
0

Re: English.php won't override?

Ajeh:

When you find your own solution ... post it so that it can help others ... :smile:

... will do for sure, in my case the language (swedish.php) file I updated to 1.3.0 had extra definitions for some old mod, which in theory should not break anything (I guess), but when getting rid off all the extras it worked. Tool I use is Files Comparer (freeware), https://www.script-debugger.com.

11 Jun 2006, 8:18 PM
#7
pauls avatar

pauls

Zen Follower

Join Date:
Feb 2006
Location:
UK
Posts:
300
Plugin Contributions:
0

Re: English.php won't override?

This is actually still an issue for me, I want to override english.php so I can add my sites copyright info into the footer. I note that english.php is here includes/languages/english.php, so I created a folder in here includes/languages/mysitesstyle/ and copied the english.php into there. However, the site still sees the original english.php ignoring my override, thanks for your help.

13 Jun 2006, 2:04 PM
#8
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: English.php won't override?

Pauls:

This is actually still an issue for me, I want to override english.php so I can add my sites copyright info into the footer. I note that english.php is here includes/languages/english.php, so I created a folder in here includes/languages/mysitesstyle/ and copied the english.php into there. However, the site still sees the original english.php ignoring my override, thanks for your help.

Check you haven't made a typo in the over ride directory name
is it mysitesstyle or mysitestyle?

15 Jun 2006, 7:40 PM
#9
pauls avatar

pauls

Zen Follower

Join Date:
Feb 2006
Location:
UK
Posts:
300
Plugin Contributions:
0

Re: English.php won't override?

No the overrides folder is correctly named

15 Jun 2006, 7:41 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: English.php won't override?

Have you an URL to this site?

15 Jun 2006, 8:58 PM
#11
pauls avatar

pauls

Zen Follower

Join Date:
Feb 2006
Location:
UK
Posts:
300
Plugin Contributions:
0

Re: English.php won't override?

Its ok fixed, I hadn't uploaded the folder, thanks

15 Jun 2006, 9:05 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: English.php won't override?

Dontcha hate when it does what you say and not what you mean ... :blink:

Thanks for the update ... :smile:

15 Jun 2006, 9:13 PM
#13
pauls avatar

pauls

Zen Follower

Join Date:
Feb 2006
Location:
UK
Posts:
300
Plugin Contributions:
0

Re: English.php won't override?

heh heh exactly :blush:

19 Jun 2006, 9:52 PM
#14
sue4ster avatar

sue4ster

New Zenner

Join Date:
Apr 2006
Location:
Halfway, Oregon
Posts:
47
Plugin Contributions:
0

Re: English.php won't override?

I'm trying to set up my first ZenCart, barely treading water. I hope my method of posting is proper here.

This thread and the one on changing page titles were very good at helping me find the right files to change.

However, I changed includes/languages/english/meta_tags.php and got the result I wanted. I saved that file into my includes/languages/sue/ folder and uploaded that into the includes/languages directory with some slight changes to the file. Those changes do not show up on the site.

It seems I'm missing something, but I don't know what. Have I misinterpreted something?

Maybe I'm getting confused between having a "sue" template folder. Do I not need the extra folder in the /languages directory?

Thank you.
Sue

20 Jun 2006, 10:43 PM
#15
pauls avatar

pauls

Zen Follower

Join Date:
Feb 2006
Location:
UK
Posts:
300
Plugin Contributions:
0

Re: English.php won't override?

I am not very clear on what your problem is Sue, but it does sound like an 'overrides' issue. From your question if I understand your explanation correctly then yes your folder structure should be the same on both your FTP site, and your local site. Indeed that was my problem, and was what I had overlooked.

As a general rule of thumb, I find it useful to know that if a particular file needs modifying I will look in the folder where it originally comes from and if I see a folder named 'classic' in that same place, then i know I should create my own overrides folder there, (in your case a folder called sue) and copy the file into my newly created folder.

Good luck with your cart :)

20 Jun 2006, 11:07 PM
#16
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: English.php won't override?

sue4ster:

However, I changed includes/languages/english/meta_tags.php and got the result I wanted. I saved that file into my includes/languages/sue/ folder and uploaded that into the includes/languages directory with some slight changes to the file. Those changes do not show up on the site.Hi Sue

Your version of the meta_tags file should be includes/languages/english/sue/meta_tags.php

3 Jul 2006, 4:51 AM
#17
rowan avatar

rowan

Zen Follower

Join Date:
May 2006
Location:
Australia
Posts:
107
Plugin Contributions:
2

Re: English.php won't override?

kuroi:

Hi Sue

Your version of the meta_tags file should be includes/languages/english/sue/meta_tags.php

Ahah, I was wondering why my overrides weren't working there. The 'classic' folder should really be removed from that directory as it gives a false impression. I've fallen for that twice now.

3 Jul 2006, 8:19 AM
#18
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: English.php won't override?

I think that the reason people take a long time to get the overrides system is because there are two structurally different override systems in operation. So just when you think you've got it, it seems to not work when you try to use it somewhere else. Specifically, language and module overrides operate in the same way as each other, and using the same principle but a different file structure to template overrides.

Template overrides operate in parallel with template_default. By this I mean that (for example)

includes/templates/template_default/customer/tpl_header.php
can be overridden by
includes/templates/YOUR_TEMPLATE/customer/tpl_header.php
Language and module overrides however, operate hierarchically. For example to override
includes/languages/english/meta_tags.php
you would go to the files location and create a directory with the same name the directory in which your template_info file is located in templates and then place your override file in the new directory, i.e.
includes/languages/english/YOUR_TEMPLATE/meta_tags.php

What this means is that the directory to which I think you are referring (languages/classic) is appropriate, but the only files you would put in there (assuming for some unfathomable reason you are actually using the "Classic Template") are your english.php, french.php, german.php, spanish.php, japanses.php, etc. Other language files would be sitting lower in the hierarchy such as languages/english/classic/header.php.

I do however agree with your point about removing the directory, though I would do so in the wider context of removing the whole template (and I know of one web host who offers an installation service who has done exactly that). I'm personally finding that upgrading sites from 1.2 to 1.3 is easiest and most effectively done by upgrading the database but rebuilding the design using the template_default rendering Classic irrelevant. Hopefully the Dev Team will strip it out of the next version Zen Cart and make it available as a download for those preferring more traditional approaches.

27 Jul 2006, 8:22 PM
#19
sonicparke avatar

sonicparke

Zen Follower

Join Date:
Jul 2006
Posts:
120
Plugin Contributions:
0

Re: English.php won't override?

I'm having the same trouble but none of the solutions in this thread work for me.

My structure appears to be correct. Here's a screen shot to avoid any confusion:

http://www.binkwaffle.com/english_php.jpg

I can't see what I'm doing wrong but there's got to be something wrong. the only override that's not working is english.php. meta_tags.php and the others are working but not english. I've edited the copyright info and Categories title but neither change shows up. However, if I edit the original english.php the changes do show up.

Weird.

27 Jul 2006, 8:45 PM
#20
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: English.php won't override?

The language.php file (e.g. english.php) should be one level up from the other language files for that language. So in your case the file path should be includes/languages/custom_fz/english.php.