Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

when accessing my account, cart contents and checkout the language switches


Grinse

Recommended Posts

Hi there,

 

I wrote an Infobox for the account (my account, cart contents and checkout) so I can place them somewhere else within the page. But when I chose one of these links the language always changes from the current selected (for example english) to the default windows (and browser) language (in this case german).

 

I just used account.php, checkout_shipping.php and shopping_cart.php for the links (as in the "original" - but there I don't have these changes).

 

Can someone help me please?

Link to comment
Share on other sites

Ok, the code from /catalog/includes/boxes/account.php is the following:

 

<?php
/*
 $Id: account.php,v 1.00 2007/09/20 22:10:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License

*/
?>
<!-- account //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_ACCOUNT);

 new infoBoxHeading($info_box_contents, false, false);

$account_string = '';

$account_string .= ' <a href="' . 'account.php' . '">' . HEADER_TITLE_MY_ACCOUNT . '</a> <br>';
$account_string .= ' <a href="' . 'shopping_cart.php' . '">' . HEADER_TITLE_CART_CONTENTS . '</a> <br>';
$account_string .= ' <a href="' . 'checkout_shipping.php' . '">' . HEADER_TITLE_CHECKOUT . '</a>';

 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text' => $account_string);

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- account_eof //-->

 

BOX_HEADING_ACCOUNT is declared in /catalog/includes/languages/english.php as:

define('BOX_HEADING_ACCOUNT', 'Account');

.

 

I hope that helps you helping me.

Link to comment
Share on other sites

Ok I solved the problem now.

 

I changed within my account.php the following lines:

	$account_string .= ' <a href="' . 'account.php' . '">' . HEADER_TITLE_MY_ACCOUNT . '</a> <br>';
$account_string .= ' <a href="' . 'shopping_cart.php' . '">' . HEADER_TITLE_CART_CONTENTS . '</a> <br>';
$account_string .= ' <a href="' . 'checkout_shipping.php' . '">' . HEADER_TITLE_CHECKOUT . '</a>';

to:

	$account_string .= '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' . HEADER_TITLE_LOGOFF . '</a><br>';
$account_string .= '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . HEADER_TITLE_MY_ACCOUNT . '</a><br>';
$account_string .= '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . HEADER_TITLE_CART_CONTENTS . '</a><br>';
$account_string .= '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . HEADER_TITLE_CHECKOUT . '</a>';

 

and now its fine.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...