Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    2
    Plugin Contributions
    0

    Default [DONE] Default Language Selection in Admin

    Dear All,

    May be a Bug,

    When you have more than on language, and you select on to edit.
    As soon as you Update it, even without any modification and without selecting the checkbox "Set as default" language, it become automatically your Default language.

    It do not happends when you create a new language but only when you edit it.

    this with Zen Cart V1.3.0.1

    tks and rgds

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

    Default Re: Default Language Selection in Admin

    Hmmm ... yes ... a bug....
    here's the fix:

    /admin/languages.php
    line 189 starts with:
    PHP Code:
            // check if we're changing settings for the default language
            
    $result $db->Execute("select code from " TABLE_LANGUAGES " where languages_id = '" . (int)$lID "'");
            
    $default_lang_change_flag = (DEFAULT_LANGUAGE == $result->fields['code'] && DEFAULT_LANGUAGE == $code) ? false true
    replace that with:
    PHP Code:
            // check if the spelling of the name for the default language has just been changed (thus meaning we need to change the spelling of DEFAULT_LANGUAGE to match it)
            
    $result $db->Execute("select code from " TABLE_LANGUAGES " where languages_id = '" . (int)$lID "'");
            
    $changing_default_lang = (DEFAULT_LANGUAGE == $result->fields['code']) ? true false;
            
    $default_needs_an_update = (DEFAULT_LANGUAGE == $code) ? false true;
            
    $default_lang_change_flag = ($default_needs_an_update && $changing_default_lang) ? true false
    .

    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.

  3. #3
    Join Date
    May 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: Default Language Selection in Admin

    Thank you DrByte

 

 

Similar Threads

  1. v153 Admin Default Language [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Dec 2015, 03:59 PM
  2. Changing meta tag default selection in Admin
    By chufty bill in forum General Questions
    Replies: 2
    Last Post: 29 Oct 2006, 10:16 AM
  3. [Done 1.3.6] admin class language.php
    By a_berezin in forum Bug Reports
    Replies: 0
    Last Post: 11 Oct 2006, 05:22 AM
  4. Default language selection problem
    By JRDMcLAREN in forum Addon Language Packs
    Replies: 6
    Last Post: 4 Jul 2006, 06:02 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