Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2008
    Posts
    3
    Plugin Contributions
    0

    Default Problem with language selection

    Hello,

    I'm using Zen Cart 1.3.8a with apple zen template.
    zencart
    I did a bit of custemization and now have come upon a wierd bug i can't seem to figure out, and was wondering if anyone out there has come across it before.

    the problem is with the language sellection, I have two languages configured english and french. When you first log on to the web site, the language selection is there, but after a while, totaly randomly it will disapear, and not come back till you restart the browser. I tried testing to see if it was just my code, but the same thing happens if i activate the sidebox. The box is there, but you can't choose the language.



    and here you can see it gone.



    the code i is

    PHP Code:
    <?php 
                 
    while (list($key$value) = each ($lng>catalog_languages)) {  
                    if(
    $key != $_SESSION['languages_code'] ) {      
                        
    $lng_cnt3 ++;           
                        if (
    $lng_cnt3 >= MAX_LANGUAGE_FLAGS_COLUMNS) {
                            
    $lng_cnt3 0;
                        }   
                        
    $content3 '<a href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language''currency')) . 'language=' $key$request_type) . '">' ucwords($value['name']) . '</a>&nbsp;&nbsp;';
                         }
                 }
                 echo 
    $content3
                 
    ?>
    which is taken directly from the sidebox code and modefied slightly.

    The problam can be seen here. http://scerbina.com/zencart

    I have tried this on both my local and server copy of zencart, and get the same problam everywhere.

    has anyone experianced this problem before or know away to get this resolved?

    thanks in advance.

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Problem with language selection

    $lng>catalog_languages
    --> is this correct? this has a syntax error here.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    Dec 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Problem with language selection

    oops, sorry that's an error i made during the post.
    should be -

    PHP Code:
    while (list($key$value) = each($lng->catalog_languages)) 
    There are some things in the code that might not make complete sance, i tried to have it as close to the original as possable to see if the problam would go away, but it still wouldn't

    just in case here is the original code from /includes/templates/template_default/sideboxes/tpl_languages.php

    PHP Code:
     $content "";
      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent centeredContent">';

      
    $lng_cnt 0;
      while (list(
    $key$value) = each($lng->catalog_languages)) {
        
    $content .= '<a href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language''currency')) . 'language=' $key$request_type) . '">' zen_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' $value['image'], $value['name']) . '</a>&nbsp;&nbsp;';
        
    $lng_cnt ++;
        if (
    $lng_cnt >= MAX_LANGUAGE_FLAGS_COLUMNS) {
          
    $lng_cnt 0;
          
    $content .= '<br />';
        }
      }
    $content .= '</div>'
    as mantioned before, i have the same problam with the original code, when i enable the language sidebox.

  4. #4
    Join Date
    Dec 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Problem with language selection

    I feel silly now

    I forgot to reset the the array.

    added:
    PHP Code:
    reset($lng->catalog_languages); 
    and it works greate now.

    Thanks for the help ^^

 

 

Similar Threads

  1. Default Payment Method Selection problem with FEC
    By Andy_GS in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 15 Oct 2010, 05:40 PM
  2. Paypal language selection
    By ChrisR in forum General Questions
    Replies: 0
    Last Post: 16 Nov 2006, 10:34 AM
  3. 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