Page 9 of 15 FirstFirst ... 7891011 ... LastLast
Results 81 to 90 of 145
  1. #81
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    Sorry, I'm not an expert on configuring for Hebrew language.

    Maybe this will help? http://www.zen-cart.com/forum/showthread.php?p=584302

    If it's a server issue with your PHP configuration, then it's something your hosting company will have to fix. It's NOT in php.ini.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #82
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,594
    Plugin Contributions
    30

    Default date and time formats

    Regarding the date format and day and month names outputted by php, you may find this thread of use regarding the available locales on your server, which may be related to your problem.

    http://www.zen-cart.com/forum/showthread.php?t=133111

    regards
    Steve

  3. #83
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: date and time formats

    Thanks Steve. I knew there was another discussion around here about that.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #84
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    Thank you Crystal Koi for your great article! I have tried to read it very carefully, but I'm afraid I don't totally understand. (I never had to work with charsets before).

    First I will explain the problem. I am maintaining a few zen cart stores for my boss. Within these stores we have german language installed. German language contains a lot of umlaut characters, which are not displayed well in the product information or in the product titles in the menu.

    My boss is not happy with it (I can't blame him) and wants me to change it. But I don't know how to change it on a working store. Will your fix work on a running store? And can I convert the db tables to utf-8 without problems? If so, how should I proceed?

    Thank you in advance!
    Working on http://www.skull-shop.net once again.

  5. #85
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    I see lots of talk about changing query_factory.php to accommodate UTF-8, but for admin there is also query_factory.php

    I see no mention of modding this as well. I did and all seems to work there fine now too.

    Also for changing your database after the fact, instead of going in and changing each field in each table, the following script works nicely. It will output a rather large list of alter table sql that you can copy and paste into phpmyadmin and change all at once. I didn't write this, but have used it and my confidence is high. It will also pickup and generate sql for any tables your other mods have added.

    Use at your own risk.

    Code:
    <?php
     
    // this script will output the queries need to change all fields/tables to a different collation
    // it is HIGHLY suggested you take a MySQL dump prior to running any of the generated
    // this code is provided as is and without any warranty
     
    die("Make a backup of your MySQL database then remove this line");
     
    set_time_limit(0);
     
    // collation you want to change:
    $convert_from = 'latin1_swedish_ci';
     
    // collation you want to change it to:
    $convert_to   = 'utf8_general_ci';
     
    // character set of new collation:
    $character_set= 'utf8';
     
    $show_alter_table = true;
    $show_alter_field = true;
     
    // DB login information
    $username = 'user';
    $password = 'pass';
    $database = 'dbname';
    $host     = 'localhost';
     
    mysql_connect($host, $username, $password);
    mysql_select_db($database);
     
    $rs_tables = mysql_query(" SHOW TABLES ") or die(mysql_error());
     
    print '<pre>';
    while ($row_tables = mysql_fetch_row($rs_tables)) {
        $table = mysql_real_escape_string($row_tables[0]);
        
        // Alter table collation
        // ALTER TABLE `account` DEFAULT CHARACTER SET utf8
        if ($show_alter_table) {
            echo("ALTER TABLE `$table` DEFAULT CHARACTER SET $character_set;\r\n");
        }
     
        $rs = mysql_query(" SHOW FULL FIELDS FROM `$table` ") or die(mysql_error());
        while ($row=mysql_fetch_assoc($rs)) {
            
            if ($row['Collation']!=$convert_from)
                continue;
     
            // Is the field allowed to be null?
            if ($row['Null']=='YES') {
                $nullable = ' NULL ';
            } else {
                $nullable = ' NOT NULL';
            }
     
            // Does the field default to null, a string, or nothing?
            if ($row['Default']=='NULL') {
                $default = " DEFAULT NULL";
            } else if ($row['Default']!='') {
                $default = " DEFAULT '".mysql_real_escape_string($row['Default'])."'";
            } else {
                $default = '';
            }
     
            // Alter field collation:
            // ALTER TABLE `account` CHANGE `email` `email` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
            if ($show_alter_field) {
                $field = mysql_real_escape_string($row['Field']);
                echo "ALTER TABLE `$table` CHANGE `$field` `$field` $row[Type] CHARACTER SET $character_set COLLATE $convert_to $nullable $default; \r\n";
            }
        }
    }
     
    ?>
    Make sure to edit in your proper username and passwd and stuff and do a backup before running the output of this script.

    Kudos to whoever wrote this, it has saved me much time.

  6. #86
    Join Date
    Mar 2010
    Posts
    17
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    I have installed recently Zen Cart and follow the instructions for installing the Japanese Pack given on srw2d.com and made the utf8 encoding conversions. The only thing I might have made wrong is that I have overwritten the files: admin/index.php, admin/invoice.php, includes/modules/payment/paypal.php, includes/functions/functions_general.php, includes/classes/order.php after installing Zen cart in English. I don't know if the order is important?

    Every things seems to work fine except the Japanese informations in the admin customers panel (next to modules). The characteres are strange, for example 田中 (Tanaka) become 縺輔→縺ソ . In my SQL Data base the names and address are written correctly in Japanese and I hope that there would not be any problem during the payment?

    Any suggestion to correct that problem? I have read all this thread to find a solution but I couldn't find it.

  7. #87
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    @ kiddo:

    Sorry for my late response, I was on holiday so hadn't checked back for a while.

    Thank you very much for the script! I will use it later on the week and report back on how it went!
    Working on http://www.skull-shop.net once again.

  8. #88
    Join Date
    Dec 2008
    Location
    Rimini, Italy, Italy
    Posts
    67
    Plugin Contributions
    0

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    Quote Originally Posted by jvanree View Post
    I am maintaining a few zen cart stores for my boss. Within these stores we have german language installed. German language contains a lot of umlaut characters, which are not displayed well in the product information or in the product titles in the menu.
    I solved the same problem with this thread's help.

    As my database was already online I followed these steps to convert it to UTF-8:


    1. Complete export of database from phpmyadmin (including Add DROP TABLE / VIEW / PROCEDURE / FUNCTION setting)
    2. Then export file editing to change every instances of CHARSET=latin1 to CHARSET=utf8
    3. Import of modified file to recreate database from scratch with every previous content (but in utf8)

  9. #89
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    @ moosesoom.. Thank you very much for your answer!!
    Working on http://www.skull-shop.net once again.

  10. #90

    Default Re: UTF-8 Zen-Cart Tutorial for v1.3.x

    Quote Originally Posted by moosesoom View Post
    I solved the same problem with this thread's help.

    As my database was already online I followed these steps to convert it to UTF-8:


    1. Complete export of database from phpmyadmin (including Add DROP TABLE / VIEW / PROCEDURE / FUNCTION setting)
    2. Then export file editing to change every instances of CHARSET=latin1 to CHARSET=utf8
    3. Import of modified file to recreate database from scratch with every previous content (but in utf8)
    Hello Moosemoon,

    Could you write of resume of the steps to follow for an already installed Zen-Cart 1.38 shop.


    Thank you.

 

 
Page 9 of 15 FirstFirst ... 7891011 ... LastLast

Similar Threads

  1. Desperate for help - Zen Cart / PHP 5 / UTF-8 issues
    By gingabox in forum General Questions
    Replies: 13
    Last Post: 15 Jun 2010, 05:45 AM
  2. Updated wamp + zen cart tutorial for Zen Cart 1.3.8a and Wamp Server 2.0i
    By dakos in forum Installing on a Windows Server
    Replies: 20
    Last Post: 29 Mar 2010, 01:07 AM
  3. Where to get Tutorial or Help file for Zen-Cart?
    By chungenhung in forum General Questions
    Replies: 9
    Last Post: 22 Jul 2009, 02:10 PM
  4. Zen Cart with UTF-8 database
    By thewolf in forum General Questions
    Replies: 5
    Last Post: 19 Jul 2007, 12:37 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