Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Mar 2007
    Posts
    33
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Dec 2005
    Posts
    1,059
    Plugin Contributions
    2

    Default 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
    [FONT=Arial]Country Kitty Crafts[/FONT][FONT=Arial]
    [/FONT] [FONT=Garamond]
    [/FONT]

  3. #3
    Join Date
    Dec 2005
    Posts
    1,059
    Plugin Contributions
    2

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

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

    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:');
    [FONT=Arial]Country Kitty Crafts[/FONT][FONT=Arial]
    [/FONT] [FONT=Garamond]
    [/FONT]

  4. #4
    Join Date
    Mar 2007
    Posts
    33
    Plugin Contributions
    0

    Default 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.

  5. #5
    Join Date
    Dec 2005
    Posts
    1,059
    Plugin Contributions
    2

    Default 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?
    [FONT=Arial]Country Kitty Crafts[/FONT][FONT=Arial]
    [/FONT] [FONT=Garamond]
    [/FONT]

  6. #6
    Join Date
    Mar 2007
    Posts
    33
    Plugin Contributions
    0

    Default 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?

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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.
    .

    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.

  8. #8

    Default 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?

  9. #9
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default 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.
    Zen cart PCI compliant Hosting

  10. #10

    Default 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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 31 May 2017, 08:57 PM
  2. Replies: 7
    Last Post: 27 May 2015, 09:32 PM
  3. v151 Stumped Override for includes / languages/ CUSTOM / header.php
    By ChadAustin in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 14 Jan 2013, 07:39 PM
  4. I can't find the CUSTOM folder -- includes/languages/english/custom/header.php
    By Yammits in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Jul 2010, 10:26 PM
  5. includes/languages/english.php is missing?
    By johngreenwood in forum General Questions
    Replies: 1
    Last Post: 30 Dec 2009, 01:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR