Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2011
    Posts
    39
    Plugin Contributions
    0

    Default tpl_top_nav.php & switching languges

    www.bh-init.com

    i made website into 2 language, English and Arabic.

    iv changed the translation of the navigation and all of them work fine expect for 2

    iv made new navigation Services & Events however when i change the header.php in language it wouldn't change events & services

    // top navigation menu text

    define('TOP_MENU_NEW_PRODUCTS', 'السلع');

    define('TOP_MENU_SERVICES', 'المناسبات');

    define('TOP_MENU_EVENTS', 'الخدمات');

    define('TOP_MENU_SPECIALS', 'العروض');

    define('TOP_MENU_VIEW_CART', 'سلة التسويق');

    define('TOP_MENU_MY_ACCOUNT', 'حسابي');

  2. #2
    Join Date
    Nov 2011
    Posts
    39
    Plugin Contributions
    0

    Default Re: tpl_top_nav.php & switching languges

    nvm i solved it :)

  3. #3
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: tpl_top_nav.php & switching languges

    Hello,

    i'm trying to have tabs (tpl_top_nav.php) for 2 languages, can you advise your solution?

    This is how my tpl_top_nav.php looks like:

    HTML Code:
    <?php
    /**
     * Template designed by zen-cart-power.net* 
     * Power your Zen Cart!
    
     * @copyright Copyright 2008-2010 Newlement
    */  
    ?>
    
    <div id="top_nav">
    
    <div class="top-nav-left"></div>
    <div class="top-nav-right"></div>
    
    
    <ul class="list-style-none float-left">
    
    
    
    <?php 
    if ($this_is_home_page) { $active = 'id="tab_active"'; 
    	} else { $active = '';
    }?>
    		<li <?php echo $active;?>><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
    
    
    <?php 
    if ($current_page_base == 'products_new') {	$active	= 'tab_active'; 
    	} else { $active = '';
    }?>
    		<li <?php echo $active;?>><a href="http://chequesplus.com/index.php?main_page=index&cPath=1"><?php echo 'Computer Cheques';?></a></li>
    
    <?php
    if ($current_page_base == 'products_new') {	$active	= 'tab_active'; 
    	} else { $active = '';
    }?>
    		<li <?php echo $active;?>><a href="http://chequesplus.com/index.php?main_page=index&cPath=2"><?php echo 'Manual Cheques' ;?></a></li>
    
    <?php
    if ($current_page_base == 'specials') { $active = 'tab_active'; 
    	} else { $active = '';
    }?>
    		<li <?php echo $active;?>><a href="http://chequesplus.com/index.php?main_page=index&cPath=7"><?php echo 'Blank Cheque Stock';?></a></li>
    		
    		<?php
    if ($current_page_base == 'specials') { $active = 'tab_active'; 
    	} else { $active = '';
    }?>
    		<li <?php echo $active;?>><a href="http://chequesplus.com/index.php?main_page=index&cPath=6"><?php echo 'Envelopes';?></a></li>
    
    <?php 
    //if ($current_page_base == 'featured_products') { $active = 'tab_active'; 
    	//} else { $active = '';
    //}?>
    		<!--li <?php //echo $active;?>><a href="index.php?main_page=featured_products"><?php //echo TOP_MENU_FEATURED_PRODUCTS;?></a></li-->
    
    <?php  
    if ($current_page_base == 'account' || $current_page_base == 'login' || $current_page_base == 'account_edit' || $current_page_base == 'address_book' || $current_page_base == 'account_password' || $current_page_base == 'account_newsletters' || $current_page_base == 'account_notifications') { $active = 'tab_active'; 
    	} else { $active = '';
    }?>
    		<!--li <?php //echo $active;?>><a href="<?php // echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php// echo TOP_MENU_MY_ACCOUNT;?></a></li-->
    									<?php if (DEFINE_CONTACT_US_STATUS <= 1) { ?>    <li><?php echo '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . BOX_INFORMATION_CONTACT . '</a>'; ?></li>  <?php } ?>				
    <?php   
    //if ($current_page_base == 'shopping_cart') { $active = 'tab_active'; 
    	//} else { $active = '';
    //}?>
    		<!--li <?php //echo $active;?>><a href="<?php //echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php //echo TOP_MENU_VIEW_CART;?></a></li-->							  
    	</ul>
    
    <div class="languages-wrapper float-right">
    <?php   
        $languges_object = new language;   
    //    if (count ($languges_object->catalog_languages) > 1){
    ?>
                <div class="languages float-right">
    				<?php require($template->get_template_dir('tpl_header_languages.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_header_languages.php'); 
    				echo $content;?>     
                </div>
    <?php
    //    } 
    ?>      
             
    <?php   
       if (isset($currencies) && is_object($currencies) && count ($currencies->currencies) > 1){
    ?>
    				<div class="currency float-right">
    				<?php require($template->get_template_dir('tpl_header_currencies.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_header_currencies.php'); 
    				echo $content;?>  
                    </div>
    <?php
      } 
    ?>                  
    		</div>
    		<div class="clearBoth"></div>
    
    </div>

 

 

Similar Threads

  1. products_with_attributes_stock.php?action=edit&products_id=114&attributes=19&q=1
    By Kontaktwear in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 31 Aug 2012, 03:02 PM
  2. Help with tpl_top_nav.php in Black Pure Free template
    By 0range98 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Nov 2011, 06:15 PM
  3. Languges & templates
    By HaIzI72G3T in forum General Questions
    Replies: 6
    Last Post: 13 Nov 2011, 12:09 AM
  4. Switching to https from http changed php
    By Goldenis in forum General Questions
    Replies: 1
    Last Post: 15 Apr 2011, 10:27 AM
  5. Category Images in tpl_top_nav.php
    By dgent in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 Jul 2010, 02:22 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