野良猫は放浪する。 -5ページ目

[wp e-commerce] ¥100が¥100.00になってしまうのを訂正。

覚書。

金額表示のところが、¥100と表示したいのに¥100.00と、
ドル.セント表示のまま金額が表示されてしまう。
のを修正。

LovyDiaryさんの
WP e-Commerce で日本語化ショッピングサイトを構築する(#002)より、


processing_functions.php

で、この関数の中身をのぞいたら、

$price_out = number_format($price_in, 2, ‘.’, ”);

number_format関数を呼んでた。

この関数に引数二個以上を渡すとその二個目の値分小数点をつけるので、

その行をコメントアウトして以下の文章に修正

$price_out = number_format($price_in);

以上で、金額の修正ができました。


ちなみに、processing_functions.phpは
wp-content/plugins/wp-e-commerce/wpsc-includes/
にあります。

さらに、カートの金額表示は
同じフォルダのcart.class.phpの1220行目らへんを
同様に修正する感じ。

です。

[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');


と修正すればいい模様。

野良猫はこれで解決しました。。。


ε-(´∀`*)ホッ

[たのしいmac] macでクリスマス! (2) -グリーティングカード編2-

グリーティングカードネタ第2弾。


iPhotoでカードが簡単につくれますよっていうお話~

いやいやそれは知ってるよって言う人がほとんどだとおもいますが・・
おうちのプリンタでもそのまま印刷できるんです。
べんり~

(* itunesで印刷だとジャケットとかアルバムの曲リストがつくれます)
(* アドレスブック.appだと宛名印刷とかラベル印刷が簡単にできます)


モデルはうちのにゃんこたんず。


野良猫は放浪する。

野良猫は放浪する。

野良猫は放浪する。

(* プリントダイアログの左下にある[PDF]ボタンで [PDFとして保存]を選ぶとPDFとして保存できます)
(* PDFをプレビュー.appで開いてサイズを調整後jpgに変換、メールに添付でもアリかなー)