ホーム » WordPress

WP E-Commerce 文字化け

Submitted by on 2009年7月11日 – 14:392 件のコメント

WordPres覚書
wp-e-commerce.3.7Beta5


1、ショッピングカート内(買い物かご)
2、パンくずリスト
での商品名文字化け :cry: htmlentitiesをhtmlspecialcharsに変更。
/wp-content/plugins/wp-e-commerce/wpsc-includes/cart.class.php 174行目

* cart item name function, no parameters
* @return string the cart item name
*/
function wpsc_cart_item_name() {
	global $wpsc_cart;
	return htmlspecialchars(stripslashes($wpsc_cart->cart_item->product_name), ENT_QUOTES);
}

/wp-content/plugins/wp-e-commerce/wpsc-includes/wpsc_query.php 171、1516、1533行目

function wpsc_the_product_title() {
	global $wpsc_query;
	//return stripslashes($wpsc_query->the_product_title());
	return htmlspecialchars(stripslashes($wpsc_query->the_product_title()), ENT_QUOTES, "UTF-8");
}
	function get_breadcrumbs() {
		global $wpdb;
		$this->breadcrumbs = array();
		$i = 0;
		if( $this->category != null) {
			if($this->is_single == true) {
				$this->breadcrumbs[$i]['name'] = htmlspecialchars(stripslashes($this->product['name']), ENT_QUOTES);
				$this->breadcrumbs[$i]['url'] = '';
				$i++;
			}
			while ($category_info['category_parent']!=0) {
				$category_info =	$wpdb->get_row("SELECT * FROM ".WPSC_TABLE_PRODUCT_CATEGORIES." WHERE id='{$category_info['category_parent']}'",ARRAY_A);
				$this->breadcrumbs[$i]['name'] = htmlspecialchars(stripslashes($category_info['name']), ENT_QUOTES);
				$this->breadcrumbs[$i]['url'] = wpsc_category_url($category_info['id']);
				$i++;
			}
		}

人気度: 2% [?]

2 件のコメント »

  • Mnaka より:

    チェックアウトの入力フォームがキャッシュ後、文字化けしてて
    checkout.class.phpを同じようにしたらなおりました。
    有難うございます。

  • さんきゅう より:

    >checkout.class.phpを同じようにしたらなおりました。
    少しでもお役に立てて良かったです。

コメント

コメントは以下からどうぞ。 trackback 通知。. コメント購読 >> コメントを購読する。 RSS

お手数ですが、お名前・E-mailを必須にしています。

以下のタグを使用することができます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Gravatarに対応しています。アバター表示させるには登録が必要です。登録 >> Gravatar.