Forums / Templates, Stylesheets, Page Layout / Override System not working the way I expected

Override System not working the way I expected

Views: 1,217

Results 1 to 12 of 12
22 Feb 2013, 7:51 PM
#1
dwlamb avatar

dwlamb

New Zenner

Join Date:
Jan 2013
Posts:
7
Plugin Contributions:
0

Override System not working the way I expected

Is it possible this article - Understanding the Override System - is outdated for this version?

I have a need to override certain values defined in english.php and meta_tags.php. Following the above stated article, I can not get it to work, even if I explicitly follow that example of 'Categories' to another value.

I have successfully set-up a custom template. Is it a different method or process when working with a custom template?

Cheers!

22 Feb 2013, 7:59 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Override System not working the way I expected

The override system is the custom template system. If you are having difficulties making it work, tell us the exact steps you took, and perhaps show us the website. The template system has not changed significantly in years.

22 Feb 2013, 8:09 PM
#3
dwlamb avatar

dwlamb

New Zenner

Join Date:
Jan 2013
Posts:
7
Plugin Contributions:
0

Re: Override System not working the way I expected

If you look at the article mentioned and my post, I tried using the steps outlined under Language Files and did not see the expected result of Categories changed to Types (something I chose subjectively just to test the steps). I tried both on a site I am developing and one that is a generic, out of the box install of Zen-Cart. I can't share url's for either of these sites for they are only on my localhost development machine.

gjh42:

The override system is the custom template system. If you are having difficulties making it work, tell us the exact steps you took, and perhaps show us the website. The template system has not changed significantly in years.

22 Feb 2013, 8:14 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Override System not working the way I expected

You said that you've set up your custom template; is it possible that you've misspelled the name of the directory /includes/languages/english/custom when you created it? That's happened to me before ...

22 Feb 2013, 8:16 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Override System not working the way I expected

What's the name of your custom template?
Is it activated in your admin? Admin->Tools->Template Select
What is the foldername in which you stored it on your server?
Did you put your custom language content into a language subfolder of the same name?

ie: Template folder: /includes/templates/fred/
Language override folders: /includes/languages/fred/english.php and /includes/languages/english/fred/xxxxxxxx.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Feb 2013, 9:02 PM
#6
dwlamb avatar

dwlamb

New Zenner

Join Date:
Jan 2013
Posts:
7
Plugin Contributions:
0

Re: Override System not working the way I expected

Thanks for the input. You indirectly answered on of my questions: Does the new sub-directory have to match the name of a custom template? I have includes/languages/english/template_msv/ and ```
includes/templates/template_msv/


includes/languages/english/template_msv/
|-english.php
|-meta-tags.php


> **lat9:**
>
> You said that you've set up your custom template; is it possible that you've misspelled the name of the directory /includes/languages/english/**custom** when you created it?  That's happened to me before ...
22 Feb 2013, 9:16 PM
#7
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Override System not working the way I expected

dwlamb:

Thanks for the input. You indirectly answered on of my questions: Does the new sub-directory have to match the name of a custom template? I have includes/languages/english/template_msv/ and ```
includes/templates/template_msv/

> 
> ```
includes/languages/english/template_msv/
                                    |-english.php
                                    |-meta-tags.php

You made a small mistake, the english.php needs to be one level down

includes/languages/english/
                  /template_msv/
                            |-english.php
22 Feb 2013, 9:55 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Override System not working the way I expected

I tried using the steps outlined under Language Files and did not see the expected result
Changes within meta_tags.php are working all right. But changes within english.ph are not. This is the structure of includes/languages/english/template_msv/```
includes/languages/english/template_msv/
|-english.php
|-meta-tags.php

22 Feb 2013, 10:15 PM
#9
dwlamb avatar

dwlamb

New Zenner

Join Date:
Jan 2013
Posts:
7
Plugin Contributions:
0

Re: Override System not working the way I expected

Design75:

You made a small mistake, the english.php needs to be one level down

includes/languages/english/
/template_msv/
|-english.php


Thanks for the input but I don't see a difference.  The end result interpretation of my attempt to represent the tree structure is no different from yours.
Within includes/languages/english/ is template_msv/ containing english.php and meta_tags.php

The mistake I made was not expressing it in a more universally respected format like yours.  The attached png will show the file tree structure  Attachment 11984

changes to meta_tags.php are working but not english.php
22 Feb 2013, 11:16 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Override System not working the way I expected

  1. The english.php override happens one level up. See my previous post.

  2. What EXACTLY are you trying to override in english.php anyway? Maybe there's no need to touch that file if another method might work better. Need to know details in order to help though.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Feb 2013, 9:11 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: Override System not working the way I expected

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Feb 2013, 4:15 PM
#12
dwlamb avatar

dwlamb

New Zenner

Join Date:
Jan 2013
Posts:
7
Plugin Contributions:
0

Re: Override System not working the way I expected

Thanks for the help and patience. I finally got it all working.

DrByte:

  1. The english.php override happens one level up. See my previous post.

  2. What EXACTLY are you trying to override in english.php anyway? Maybe there's no need to touch that file if another method might work better. Need to know details in order to help though.