Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2008
    Location
    Halifax, NS
    Posts
    272
    Plugin Contributions
    0

    bug French - now in your cart (tpl_header.php)

    Ok i just found out where "now in your cart" is hidding.. its in the
    includes/templates/theme072/common/tpl_header.php

    But its seems that there is no FRENCH file for this to translate this..

    Is there a way to do this... as when you go to the french side it still says now in your cart

    Any help would be great..

    thanks


  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: French - now in your cart (tpl_header.php)

    Are you using a purchased template?

    In the default set up the text that is used for this is stored in a variable that is called HEADER_TITLE_CART_CONTENTS. This variable is defined in header.php which is in(for english):

    includes/languages/english

    So, this is a english language specific file. There should be a french language specific equivilant to this file which would contain the appropriate French language phrase. So as a user chooses there language the right set of phrases are used for them.

    It should be easy to restore this functionality if it is what you require. Let us know.

    Nik

  3. #3
    Join Date
    Aug 2008
    Location
    Halifax, NS
    Posts
    272
    Plugin Contributions
    0

    Default Re: French - now in your cart (tpl_header.php)

    yes i know about these 2 files.. have been updating them.

    but as you look its not in this CODE..

    If you do a seach.. using your developers tool kit it will only come up in that file that I specified...

    Code:
    <?php
    /**
     * @package languageDefines
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header.php 2940 2006-02-02 04:29:05Z drbyte $
     */
    
    // header text in includes/header.php
      define('HEADER_TITLE_CREATE_ACCOUNT', 'Create Account');
      define('HEADER_TITLE_MY_ACCOUNT', 'My Account');
      define('HEADER_TITLE_CART_CONTENTS', 'Shopping Cart');
      define('HEADER_TITLE_CHECKOUT', 'Checkout');
      define('HEADER_TITLE_TOP', 'Top');
      define('HEADER_TITLE_CATALOG', 'Home');
      define('HEADER_TITLE_LOGOFF', 'Log Out');
      define('HEADER_TITLE_LOGIN', 'Log In');
    
    // added defines for header alt and text
      define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce');
      define('HEADER_SALES_TEXT', 'TagLine Here');
      define('HEADER_LOGO_WIDTH', '192px');
      define('HEADER_LOGO_HEIGHT', '64px');
      define('HEADER_LOGO_IMAGE', 'logo.gif');
    
    // header Search Button/Box Search Button
      define('HEADER_SEARCH_BUTTON','Search');
      define('HEADER_SEARCH_DEFAULT_TEXT', 'Enter search keywords here');
    
    ?>

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: French - now in your cart (tpl_header.php)

    This is the line in the default version on tpl_header.php

    Code:
    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
    Does your version of tpl_header.php include that line?

    It is using a variable that is defined in header.php. There should be an english and a French version of this file.

    A bientot

    Nik

  5. #5
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: French - now in your cart (tpl_header.php)

    to clarify there should be a french and english version of header.php.

    Not a french and english version of tpl_header.php

  6. #6
    Join Date
    Aug 2008
    Location
    Halifax, NS
    Posts
    272
    Plugin Contributions
    0

    Default Re: French - now in your cart (tpl_header.php)

    Here is my file code..


    Here is the file that is on..

    Code:
    <span>now in your cart</span> &nbsp; <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL');?>"><?php echo $items;?></a>
    ALL THE CODE FOR THE Page..
    Code:
    <?php
    /**
     * Common Template - tpl_header.php
     *
     * this file can be copied to /templates/your_template_dir/pagename<br />
     * example: to override the privacy page<br />
     * make a directory /templates/my_template/privacy<br />
     * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
     * to override the global settings and turn off the footer un-comment the following line:<br />
     * <br />
     * $flag_disable_header = true;<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
     */
    ?>
    <?php
    
    	
      // Display all header alerts via messageStack:
      if ($messageStack->size('header') > 0) {
        echo $messageStack->output('header');
      }
      if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
      echo htmlspecialchars(urldecode($_GET['error_message']));
      }
      if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
       echo htmlspecialchars($_GET['info_message']);
    } else {
    
    }
    ?>
    
    
    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>
    
    	<div class="menu">
            	<?php #HEADER START ?>
                    
    			<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
                    <?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
                <?php } ?>
                
    			<?php #HEADER END ?>
                <div class="clear"></div>
        </div>
    	<div class="separator_1">
    		<?php echo zen_draw_separator($image = 'pixel_trans.gif', '1', '5');?>
    	</div>
    
    
    	<div class="navigation">
    			<div class="nav_1">
    				<div class="indent">
    					<?php #HEADER LINKS START ?>
        
                        <?php if ($_SESSION['customer_id']) { ?>
                            <a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
                        <?php
                              } else {
                                if (STORE_STATUS == '0') {
                        ?>
                            <a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a>
                        <?php } } ?>  
                        <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
                              &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a>
                        <?php } ?>
            
                        <?php #HEADER LINKS END ?>
    				</div>
    			</div>
    			<div class="nav_2">
    				<div class="indent">
    					<?php echo BOX_HEADING_LANGUAGES;?>:<br />
    					<br style="line-height:4px;" />
    				
    					<?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>
    			</div>
    			<div class="nav_3">
    				<div class="indent">
    					<?php echo BOX_HEADING_SHOPPING_CART;?>:<br />
    					<br style="line-height:7px;" />
    					<?php 
    						if ($_SESSION['cart']->count_contents() == 1) {
    							$items = $_SESSION['cart']->count_contents() . ' item';
    						} else {
    							$items = $_SESSION['cart']->count_contents() . ' items';
    						}
    					
    					?>
    
    					<span>now in your cart</span> &nbsp; <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL');?>"><?php echo $items;?></a>
    				</div>
    			</div>
    			<div class="nav_4">
    				<div class="indent">
    					<?php echo BOX_HEADING_CURRENCIES;?>:<br />
    					<br style="line-height:3px;" />
    				
    					<?php #CURRENCIES START ?>
                    
                        <?php echo zen_draw_form('currencies', zen_href_link(basename(ereg_replace('.php','', $PHP_SELF)), '', $request_type, false), 'get')?>
        
                        <?php
                        
                            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);
                                }
                              }
                            }
                        
                        ?><?php echo zen_draw_pull_down_menu('currency', $currencies_array, $_SESSION['currency'], ' onchange="this.form.submit();" style="width:107px;"') . $hidden_get_variables . zen_hide_session_id()?></form>
        
                        <?php #CURRENCIES END ?>
    				</div>
    			</div>
    			<div class="clear"></div>
    	</div>
    	
    	<div class="head">
    		<div class="bg_l">
    			<div class="bg_r">
    				<div class="logo">
    					<a href="<?php echo HTTP_SERVER . DIR_WS_CATALOG ?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.gif'); ?></a>
    				</div>
    			</div>
    		</div>
    	</div>
    
    
    
    
    
    
    			<?php if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                    
                    if ($banner->RecordCount() > 0) {
    			?>
            
    			<?php
                        echo zen_display_banner('static', $banner);
    			?>
                   
    		
    			<?php	        
                    } 
                    
                } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2
    			?>
        
    		
    
    
    			<?php
    				if (CATEGORIES_TABS_STATUS == '1') {
    			?>
                
    
                <?php
    					require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php');
        		?>
            
        
    			<?php
    				}
    			?>
        <div class="clear"></div>
    
    
    
    
    <?php } ?>

  7. #7
    Join Date
    Aug 2008
    Location
    Halifax, NS
    Posts
    272
    Plugin Contributions
    0

    Default Re: French - now in your cart (tpl_header.php)

    well i put this code in to replace the TEXT on that page...

    Code:
    <span><?php echo HEADER_TITLE_CART_CONTENTS; ?></span>
    And it worked..

    YAHHHHH

    thanks for you help..


  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: French - now in your cart (tpl_header.php)

    Really pleased that you got it working! Templates can sometimes be a nuisance!

    I keep a default version of zen cart on my hard drive just as a reference of what it looked like before I started fiddling!

    Nik

  9. #9
    Join Date
    Aug 2008
    Location
    Halifax, NS
    Posts
    272
    Plugin Contributions
    0

    Default Re: French - now in your cart (tpl_header.php)

    ya thats what i do as well.. I can search the DIR.. if i trying to modify something..

    yes templates aren't fun....

  10. #10
    Join Date
    Aug 2008
    Location
    Halifax, NS
    Posts
    272
    Plugin Contributions
    0

    Default Re: French - now in your cart (tpl_header.php)

    SOLVED thanks

 

 

Similar Threads

  1. now in your cart in another language (tpl_header.php)
    By cinziapdl in forum Addon Language Packs
    Replies: 12
    Last Post: 10 Feb 2012, 12:31 AM
  2. edited tpl_header.php now looks bad in firefox
    By beasleybub in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Jul 2009, 08:36 PM
  3. Now in your cart - translation probs
    By road in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Jul 2009, 10:35 PM
  4. "now in your cart" - what php file is this in?
    By imfsub12 in forum General Questions
    Replies: 4
    Last Post: 6 Jun 2009, 05:14 PM
  5. slightly custom tpl_header was working .. now not
    By Noneya99 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Apr 2008, 03:23 AM

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