If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Trouble with kana fields

Trouble with kana fields

Started by cjcraven on 9 Apr 2014, 12:57 AM · Views: 1,878

Results 1 to 9 of 9
9 Apr 2014, 12:57 AM
#1
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

Trouble with kana fields

Upgraded from 1.3.9h to 1.5.1, I tested and seemed to be fine. An existing customer placed order no problem. Today a new customer tried to register but could not complete. I tried to make a new test customer but failed and the store reported back that the email address already existed. I checked the customer table and found the test customer had been created. I checked the address_book table and customer_info table but could not find corresponding entry. I viewed the error logs and found the following;

[08-Apr-2014 19:19:35] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in /xxx/xx_admin/customers.php on line 1225
[08-Apr-2014 19:19:35] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in/xxx/xx_admin/customers.php on line 1227
[08-Apr-2014 19:19:35] PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in /xxx/xx_admin/includes/classes/object_info.php on line 29
[08-Apr-2014 19:19:35] PHP Warning: Variable passed to each() is not an array or object in /xxx/xx_admin/includes/classes/object_info.php on line 30

The customers.php lines starting with 1222 are as follows;

    $reviews = $db->Execute("select count(*) as number_of_reviews
                             from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers->fields['customers_id'] . "'");

    $customer_info = array_merge($country->fields, $info->fields, $reviews->fields);

    $cInfo_array = array_merge($customers->fields, $customer_info);
    $cInfo = new objectInfo($cInfo_array);
  }

    $group_query = $db->Execute("select group_name, group_percentage from " . TABLE_GROUP_PRICING . " where
                                 group_id = '" . $customers->fields['customers_group_pricing'] . "'");

Any advice welcome.

On a Shared Server
Zen Cart 1.5.1
Server OS: Linux 3.2.52
Database: MySQL 5.5.32-log
Server: Apache/2
PHP Version: 5.2.17 (Zend: 2.2.0)

9 Apr 2014, 3:12 AM
#2
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

Re: Trouble with kana fields

Okay, I figured it out. For all of you trying to run a store in Japan and who want Kana fields - it is pretty complicated! Besides the database changes, the customers.php file needs to be changed in a number of places to account for kana fields. Also all the below files need changing too. Anyway too much for me now - will live without kana for a for the time being.

admin\includes\application_top.php
admin\customers.php
includes\modules\pages\account_edit\header_php.php
includes\modules\pages\account_edit\jscript_form_check.php
includes\modules\pages\address_book_process\header_php.php
includes\modules\pages\login\jscript_form_check.php
includes\modules\checkout_new_address.php
includes\modules\create_account.php
includes\templates\template_default\templates\tpl_account_edit_default.php
includes\templates\template_default\templates\tpl_modules_address_book_details.php
includes\templates\template_default\templates\tpl_modules_checkout_new_address.php
includes\templates\template_default\templates\tpl_modules_create_account.php
includes\application_top.php

9 Apr 2014, 3:14 AM
#3
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

Re: Trouble with kana fields

This is not a upgrade issue, sorry about posting in wrong spot.

9 Apr 2014, 3:29 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Trouble with kana fields

Besides the database changes, the customers.php file needs to be changed in a number of places to account for kana fields.Can you explain further about the required changes?
If I recall correctly, the last time I saw someone talk about kana support all that was required was longer field lengths to account for multibyte characters, and the use of the correct multibyte character-set (charset). But, it's been awhile and I might have my wires crossed.

Will be happy to consider appropriate changes for a future version, but need details of what you see being required, and why (ie: how to test that it is correct).

.
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.

10 Apr 2014, 12:23 AM
#5
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

Re: Trouble with kana fields

I tried to reply twice but they are not posted, are they getting through?

15 Apr 2014, 11:01 PM
#6
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

Re: Trouble with kana fields

I am happy to help Zen Cart all I can, can send all the required files and observations needed. Just let me know how to proceed.

16 Apr 2014, 1:06 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Trouble with kana fields

cjcraven:

I tried to reply twice but they are not posted, are they getting through?
Apparently not.
I've PM'd you.

.
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.

17 Apr 2014, 12:53 AM
#8
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

Re: Trouble with kana fields

Okay, files sent separately.

17 Apr 2014, 5:49 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Trouble with kana fields

Thanks.
Will try to schedule some time to investigate.

.
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.