[wp e-commerce] your accountページのフォームの文字化け対策。
wordpressのプラグイン、wp e-commerceの文字化け対策。
購入後、アカウントのページ(your-account)の your detailのフォーム内容が文字化けしちゃって、
なんじゃこりゃ・・なかんじになってしまってました。
PHPにうとい野良猫はgoogle先生に助けを求め。
日本語のサイトだとここが参考になりました。
コメントで本件に触れられています。
チェックアウトの入力フォームがキャッシュ後、文字化けしてて
checkout.class.phpを同じようにしたらなおりました。
- "WP E-Commerce 文字化け | さんきゅう堂的_STYLE"
ということは、checkout.class.phpをいじればいいのね!ありがとう!
てなわけでさらにぐぐって見つけました~^^
&解決しました~^^
ソースはここ。公式のフォーラム。。
キャッシュしか残ってなかったけど・・・
なのでこっちに勝手に控えておくことにします。w
utf8 display of - Instinct Entertainment | Instinct Forums
If your are using wp and wp-e-commerce under a language other than english you might have done an adviseable thing and have changed all of your wp tables to utf8 (general or unicode). I came across an issue with the display of »foreign« characters at the checkout process.
In case you place an order as a registered user, wp-e-commerce checks wp-usermeta for your last adress entry etc. (the SESSION and "collected_data" thing) and displays these values in the user data form. In my case these values used to be displayed wrongly ( "ü" instead of "ü"), but I found a way to fix it. In wpsc_includes/checkout.class.php go to line 348 and just add "ENT_QUOTES,'utf-8'":
348 htmlentities(stripslashes($_SESSION['wpsc_checkout_saved_values'][$this->checkout_item->id]), ENT_QUOTES,'utf-8');
The same applies to the second country list (drop down select). In order to fix the country list in your respective language open shopping_cart_functions.php (plugin root) go to line 116 and do the same:
116 $output .= "\n\r";
I also altered the following files accordingly (just to be sure):
edit-profile.php (plugin root) - line 103
/themes/default/cart_widget.pph - line 72
I hope this can be of some help to somebody,
saludos desde Munich - Markus
どうやら今回のケースでは、
edit-profile.php (plugin root) - line 103
と書いてあるように、
wp-content/pluguins/wp-e-commerce/edit-profile.php
の103行目を
$meta_data[$form_field['id']] = htmlentities(stripslashes($meta_data[$form_field['id']]), ENT_QUOTES);
↓
$meta_data[$form_field['id']] = htmlentities(stripslashes($meta_data[$form_field['id']]), ENT_QUOTES, 'UTF-8');
と修正すればいい模様。
野良猫はこれで解決しました。。。
ε-(´∀`*)ホッ