OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Lang VietNammese help ? big problem ... thank !
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Languages and Zones
tictacus
Thank Vger follow to you i find to Problem Headers already send by
http://www.oscommerce.info/kb/osCommerce/G...mon_Problems/15

I did follow to this sollution but not work. I think it's big problem for encode utf-8 charset. I want to use langue VietNam in oscommerce. thus i user charset utf-8 for vietnammese .
But when i encode charset utf-8 these are code BOM will send to server before header() . You can see code in /includes/functions/general.php :

CODE
<?php
/*
$Id: general.php,v 1.231 2003/07/09 01:15:48 hpdl Exp $

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

Copyright © 2007 osCommerce

Released under the GNU General Public License
*/

////
// Stop from parsing any further PHP code
function tep_exit() {
tep_session_close();
exit();
}

////
// Redirect to another page or site
function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
}
}



header('Location: ' . $url);


header('Location: ' . $url); <------ it's erro make bug when I finish login. It redirect me to other link and warning : Warning: Cannot modify header information - headers already sent by (output started at /home/vipvn1/public_html/os/catalog/includes/languages/english/login.php:1) in /home/vipvn1/public_html/os/catalog/includes/functions/general.php on line 35

I change header('location: '. $url); by script :

CODE
<?
echo '<script language="Javascript">
<!--
document.location.replace("index.php");
// -->
</script>';


It's good for login back main page. But when i come to add cart to buy Products if I am not yet login then it always come back main page , not to step following e.x check out .... Or if I am login successful then i can not add cart to buy Product ....

It's very difficult for me to resolve this problem for my Langue Vietnamese. Can you help me . Thank alots
congthanhvn
QUOTE (tictacus @ Dec 14 2007, 04:33 PM) *
Thank Vger follow to you i find to Problem Headers already send by
http://www.oscommerce.info/kb/osCommerce/G...mon_Problems/15

I did follow to this sollution but not work. I think it's big problem for encode utf-8 charset. I want to use langue VietNam in oscommerce. thus i user charset utf-8 for vietnammese .
But when i encode charset utf-8 these are code BOM will send to server before header() . You can see code in /includes/functions/general.php :

CODE
<?php
/*
$Id: general.php,v 1.231 2003/07/09 01:15:48 hpdl Exp $

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

Copyright © 2007 osCommerce

Released under the GNU General Public License
*/

////
// Stop from parsing any further PHP code
function tep_exit() {
tep_session_close();
exit();
}

////
// Redirect to another page or site
function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
}
}



header('Location: ' . $url);


header('Location: ' . $url); <------ it's erro make bug when I finish login. It redirect me to other link and warning : Warning: Cannot modify header information - headers already sent by (output started at /home/vipvn1/public_html/os/catalog/includes/languages/english/login.php:1) in /home/vipvn1/public_html/os/catalog/includes/functions/general.php on line 35

I change header('location: '. $url); by script :

CODE
<?
echo '<script language="Javascript">
<!--
document.location.replace("index.php");
// -->
</script>';


It's good for login back main page. But when i come to add cart to buy Products if I am not yet login then it always come back main page , not to step following e.x check out .... Or if I am login successful then i can not add cart to buy Product ....

It's very difficult for me to resolve this problem for my Langue Vietnamese. Can you help me . Thank alots







Give helpped to body wherewith- Vietnamese language setup guideline- Vietnameze- from source is one hand. What is setup like?


http://www.oscommerce.com/community/contri.../search,vietnam
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.