Forums / Addon Templates / Flag and Language drop down menu in header

Flag and Language drop down menu in header

Views: 4,941

Results 1 to 13 of 13
12 Aug 2011, 10:40 PM
#1
lindap avatar

lindap

New Zenner

Join Date:
Jul 2011
Posts:
7
Plugin Contributions:
0

Flag and Language drop down menu in header

Just got my site up and need to fix something. My url is www.m o t herlandremedies.com. In the header there is an ovious missing link. When you curser over it it says 'American'. I need to find where this is coded and comment the whole thing out. It makes the site look half finished! When viewed the source code is

"<div class="col2">

    <div class="indent">
      <div class="col1"><img src="includes/templates/template_default/images/pixel_trans.gif" alt="" width="1" height="5" /><br />
        <strong>:</strong></div>
      <div class="col2"><div class="indent">
      
						                                <a href="http://www.motherlandremedies.com/index.php?main_page=index&language=en"><img src="includes/languages/english/images/" alt="American" title=" American "  style="vertical-align:middle;" /></a>                            </div>
        
      </div>

How can I identfiy which file to look at?
I did try in the admin panel "Tools" and searched with several words with no positive results.

Please help!

Linda Prowse

13 Aug 2011, 7:05 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Flag and Language drop down menu in header

Give it a try by turning off the languages in the Tools >> Layout Boxes Controller.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

13 Aug 2011, 10:50 AM
#3
lindap avatar

lindap

New Zenner

Join Date:
Jul 2011
Posts:
7
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

Already tried that. It is off.

14 Aug 2011, 4:31 AM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Flag and Language drop down menu in header

Sure sign of a Template Monster Template.:censored:
They can make things real "purdy" but have no clue as to what is controlled by the admin menus or coded into the database.
SO... They devise their own plan for "purdy" and to :censored: with functionality down the road.
Then, after creating the bogus col1, col2, and col3, they mix them all through out the TM stylesheet trying to place them where they want them.
Unfortunately, you are going to need to exorcise a lot from the stylesheet_tm.css.
Start by adding this to the end of the stylesheet_tm.css and see if it will respond to that.> .col1 .col2 {display: none;}If that does the trick, you're done till the next "fix" rears its ugly head. Otherwise we'll need to "massage" more.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

14 Aug 2011, 4:41 AM
#5
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,664
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

You really need to complain to your template provider that they have disabled/broken the stock functionality of Zen Cart.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

14 Aug 2011, 6:07 PM
#6
lindap avatar

lindap

New Zenner

Join Date:
Jul 2011
Posts:
7
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

Add that line of code did not work. Unfortunately. I went into tps_header.php and commented out the following:

<!-- <?php # LANGUAGE START ?> <?php if (!isset($lng) || (isset($lng) && !is_object($lng))) { $lng = new language; } reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { echo '<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'], '', '', ' style="vertical-align:middle;"') . '</a>'; } ?> <?php # LANGUAGE END ?></div> -->

It should not be necessary!! There has to be a better way - but this is all I could find. I am just sure I am going to break my zen-cart trying to fix this stupid template.

14 Aug 2011, 7:23 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Flag and Language drop down menu in header

yep, wrong file. You did put that call at the end of stylesheeet_tm.css, right?
You need to use the Developers Tool Kit to find where col1 and col2 are being created.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

15 Aug 2011, 12:23 PM
#8
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

Go to your stylesheet_tm.css file.

find the line below and put display: none; like I have below (copy and paste in the whole line)...

.header_t .row3 .col2 .col1{width:71px; float:left; display: none;}

16 Aug 2011, 7:37 PM
#9
lindap avatar

lindap

New Zenner

Join Date:
Jul 2011
Posts:
7
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

Thank you so much! I added that line under the code in stylesheet_tm.css and it worked!! Yayyy:clap:

16 Aug 2011, 8:09 PM
#10
lindap avatar

lindap

New Zenner

Join Date:
Jul 2011
Posts:
7
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

I was wrong - it is still there! Could not see it in Mozilla - but could in IE - so I rebooted. Now I see it in both! Any more advice? I did try the seach in the tools in admin - I don't seem to be using it right because i get nothing.

16 Aug 2011, 8:20 PM
#11
lindap avatar

lindap

New Zenner

Join Date:
Jul 2011
Posts:
7
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

Here is the code again:

<div class="col2">
    <div class="indent">

      <div class="col1"><img src="includes/templates/template_default/images/pixel_trans.gif" alt="" width="1" height="5" /><br />

        <strong>:</strong></div>

     <div class="col2"><div class="indent">

			
                            <a href="http://www.motherlandremedies.com/index.php?main_page=index&language=en"><img src="includes/languages/english/images/" alt="American" title=" American "  style="vertical-align:middle;" /></a>
                        </div>

        

      </div>

I searched in the Developer Tools alt="American" in the first seach area. I get now results. So I tried all the other searches - still no results. Is there a better way to search for this code?

16 Aug 2011, 10:09 PM
#12
lindap avatar

lindap

New Zenner

Join Date:
Jul 2011
Posts:
7
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

Found it. Kindof. Was in templates/theme205/css/stylesheet_tm.css line 105.

.header_t .row3 .col2 .col2 .indent{padding:4px 34px 0 0; display:none;}

Added the display: none;

8 Dec 2011, 7:51 PM
#13
ka1ber avatar

ka1ber

New Zenner

Join Date:
Dec 2010
Posts:
14
Plugin Contributions:
0

Re: Flag and Language drop down menu in header

I know this is a little late after the initial post, however I have been messing around with this for some time now. I unfortunately have one of those "nasty" purchased templates that override everything default in Zen Cart. Needless to say if there is anything I need changed it is a wild goose chase to try and find it.

Anyway I was able to remove both the Languages text, the flag, & the currency drop down box.

First the currency box:

includes/templates/YOUR_TEMPLATE/common/tpl_header.php

Took out the following line of code:

*<div class="nav_currencies">

                <?=zen_draw_form('currencies', zen_href_link(basename(ereg_replace('.php','', $PHP_SELF)), '', $request_type, false), 'get')?>

                <?
                
                    if (isset($currencies) && is_object(currencies)) {
                
                      reset($currencies->currencies);
                      $currencies_array = array();
                      while (list($key, $value) = each($currencies->currencies)) {
                        $currencies_array[] = array('id' => $key, 'text' => $value['title']);
                      }
                
                      $hidden_get_variables = '';
                      reset($_GET);
                      while (list($key, $value) = each($_GET)) {
                        if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
                          $hidden_get_variables .= zen_draw_hidden_field($key, $value);
                        }
                      }
                    }
                
                ?><?=zen_draw_pull_down_menu('currency', $currencies_array, $_SESSION['currency'], ' onchange="this.form.submit();"') . $hidden_get_variables . zen_hide_session_id()?></form>





            </div> <!-- nav_currencies -->   

As for the Languages Text and Flag:
**
includes/templates/YOUR_TEMPLATE/css/stylesheet.css
**
Find the following line of code may not be exactly the same / depends on your template!!!

#navCurrenciesWrapper .nav_language {float:left; margin-top: 9px; padding:0px 15px 3px 0px;}

replace with

#navCurrenciesWrapper .nav_language {float:left; margin-top: 9px; padding:0px 15px 3px 0px;display:none;}