Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / includes/languages/english/custom override not working

includes/languages/english/custom override not working

Locked

Views: 10,962

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
17 Apr 2007, 7:32 PM
#1
bostitch avatar

bostitch

New Zenner

Join Date:
Mar 2007
Posts:
33
Plugin Contributions:
0

includes/languages/english/custom override not working

I think I correctly set up my override structure, and things appear to be coming together... (I think)... with the exception of the language files, which will not override the default files.

I created my custom directories as follows:
includes/languages/english/'custom' and includes/languages/'custom'

My first clue that the override was not working properly, was the fact that the sentence " You may want to add some instructions for using the shopping cart here. (defined in includes/languages/english/shopping_cart.php)" keeps appearing at the top of the page. This sentence is in the default file shopping_cart.php, and not in any of my custom files. Thus, the default files are still controlling things.

I put the meta_tag.php files in both custom folders. I have checked my spelling, and case sensitivity issues. I have checked my admin setttings.

Have I missed something that prevents my custom files from overriding the default files for the languages section?

Any insight would be appreciated.

17 Apr 2007, 7:41 PM
#2
tshooters avatar

tshooters

Totally Zenned

Join Date:
Dec 2005
Posts:
1,037
Plugin Contributions:
2

Re: includes/languages/english/custom override not working

Copies of the define_pagename_.php files that you want to customize need to go into includes/languages/english/html_includes/your_template_name

17 Apr 2007, 7:50 PM
#3
tshooters avatar

tshooters

Totally Zenned

Join Date:
Dec 2005
Posts:
1,037
Plugin Contributions:
2

Re: includes/languages/english/custom override not working

Ooopss...sorry! Disregard above. Was thinking define pages. :blush:

You have your file in the right place. That line is in the file here, and can
be changed with your instructions to customers:

define('NAVBAR_TITLE', 'The Shopping Cart');
define('HEADING_TITLE', 'Your Shopping Cart Contents');
define('HEADING_TITLE_EMPTY', 'Your Shopping Cart');
define('TEXT_INFORMATION', 'You may want to add some instructions for using the shopping cart here. (defined in includes/languages/english/shopping_cart.php)');
define('TABLE_HEADING_REMOVE', 'Remove');
define('TABLE_HEADING_QUANTITY', 'Qty.');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRICE','Unit');
define('TEXT_CART_EMPTY', 'Your Shopping Cart is empty.');
define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');
define('SUB_TITLE_TOTAL', 'Total:');

17 Apr 2007, 7:59 PM
#4
bostitch avatar

bostitch

New Zenner

Join Date:
Mar 2007
Posts:
33
Plugin Contributions:
0

Re: includes/languages/english/custom override not working

Thanks for your response.

I know where that line of text is coming from in the default file. However, the fact that the default file text is appearing, instead of MY text, is why I believe the override is not working correctly.

I realize that I can go into the default file and edit the core file to make it say what I want, but I thought the override was suppose to avoid altering the core files.

17 Apr 2007, 8:29 PM
#5
tshooters avatar

tshooters

Totally Zenned

Join Date:
Dec 2005
Posts:
1,037
Plugin Contributions:
2

Re: includes/languages/english/custom override not working

Okay....you've changed that in your override shopping_cart.php file.
(That was what I meant... your custom/shopping_cart.php file.)
Then it goes in your includes/languages/english/custom folder. And you've
uploaded it and have it there? And your custom folders are named the same
as includes/templates/(your) custom folder?

18 Apr 2007, 4:17 AM
#6
bostitch avatar

bostitch

New Zenner

Join Date:
Mar 2007
Posts:
33
Plugin Contributions:
0

Re: includes/languages/english/custom override not working

All of my names are ok. I have checked and double checked, and then went back and checked again.

But I think I figured it out. I somehow lost my
define('TEXT_INFORMATION', ''); from my custom file.

So I guess it was taking the
define('TEXT_INFORMATION', 'You may want to add some instructions for using the shopping cart here. (defined in includes/languages/english/shopping_cart.php)');
from the default file.

So putting the define statement in my custom file seems to have fixed things.

Does that sound right? It would take a single define from the default file, but still use the custom file for any new defines that are listed there?

18 Apr 2007, 7:29 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: includes/languages/english/custom override not working

Yes ... it was programmed that way because folks figured that deleting entire definitions would somehow magically remove the text.
They also often failed to upgrade their customized language files properly, thus things were getting missed.
Thus, the catchall offers some protection.

27 Jun 2007, 2:01 PM
#8
paraiba avatar

paraiba

New Zenner

Join Date:
Dec 2006
Posts:
11
Plugin Contributions:
0

Re: includes/languages/english/custom override not working

I was having exactly the same problem although my TEXT define was there. Still haven't worked out what's going on. My question though is, why on earth is that line in the php files rather than in the admin to make it easy for clients to change?:huh:

27 Jun 2007, 3:10 PM
#9
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: includes/languages/english/custom override not working

the simple answer is that if things like this were stored inth eDB it would soon bloat the DB and would then add more queries on each page load, and that is one thing ZC DOSNT need is more queries per page.

28 Jun 2007, 11:20 AM
#10
paraiba avatar

paraiba

New Zenner

Join Date:
Dec 2006
Posts:
11
Plugin Contributions:
0

Re: includes/languages/english/custom override not working

OK, understand but it's inconsistent. Some things can be changed in admin others can't. If it's a sensible message that somebody just doesn't like then great, it's down to them to hack the code but when it's a message saying "you might like to change this" then surely it should be easily accessible via admin.

30 Jun 2009, 6:21 PM
#11
jiten avatar

jiten

New Zenner

Join Date:
Mar 2009
Posts:
1
Plugin Contributions:
0

Re: includes/languages/english/custom override not working

I see I am entering this issue a long time after it was discussed.. however.. I prefer to do it rather than opening a new one since this has not been totally replied...

Today I got the surprise of having the same message, that looks lika a message error... so I 'd like to know whether nowadays there is any patch for this... also I'd like to know if tehre are any other parts where it's necessary a personal customization entering the files ? I'll appreciate your answers...

Thanks in advance,

1 Jul 2009, 3:45 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: includes/languages/english/custom override not working

It would help if you could post what you are seeing on your site about the error message ... :smile: