2013年3月14日木曜日

Google Readerが2013年7月で終了

マジか。。。 乗り換え先探すか、、、

2012年1月28日土曜日

CS-Cart SSLから抜けるとトップページに戻ってしまう

CS-Cartの仕様なのかこちらのRewriteRuleの設定を間違っているのか不明だけど「SSL使用ページにアクセスした後はHTTPS接続を維持」にチェックが入っていないと、カートページでカートに入っている商品をクリックしてしまうと商品詳細ページではなくトップページに飛ばされる。

https://〜/index.php?dispatch=checkout.cart

カートに入っているサムネイル、商品名のリンクをクリックすると
https://〜/index.php?dispatch=products.view&product_id=1

http://〜/index.php

できれば


https://〜/index.php?dispatch=checkout.cart

カートに入っているサムネイル、商品名のリンクをクリックすると
https://〜/index.php?dispatch=products.view&product_id=1


http://〜/index.php?dispatch=products.view&product_id=1

となって欲しい・・・

2012年1月27日金曜日

CS-CartをFastCGIで運用するときに

個人的なメモ

mod_fastcgiのバージョンが2.4.6の時、
Apache2+FastCGI(mod_fastcgi)+PHP-FPMの環境で納品書(PDF)をダウンロードすると

FastCGI: comm with server "/var/www/fcgi-bin/php-fpm" aborted: error parsing headers: duplicate header 'Content-Type', referer: ...

とInternal Serverエラーが出る

mod_fastcgiのバグ?らしいのでSnapshot版の http://www.fastcgi.com/dist/mod_fastcgi-SNAP-0811090952.tar.gz と入れ替える。
mod_fastcgi-SNAP-0910052141.tar.gzの方が新しいようだけど未検証。

2012年1月25日水曜日

CS-Cart パンくずリストをリッチスニペット化

skins/basic/customer/common_templates/breadcrumbs.tplを修正

http://support.google.com/webmasters/bin/answer.py?hl=ja&answer=185417&topic=1088474&ctx=topic を参考に

http://www.google.co.jp/webmasters/tools/richsnippets で確かめる

修正例


{* $Id$ *}

{if $breadcrumbs && $breadcrumbs|@sizeof > 1}
<div class="breadcrumbs">
{strip}
{foreach from=$breadcrumbs item="bc" name="bcn" key="key"}
{if $key != "0"}
<img src="{$images_dir}/icons/breadcrumbs_arrow.gif" class="bc-arrow" border="0" alt="&gt;" />
{/if}
{if $bc.link}
<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="{$bc.link|fn_url}"{if $additional_class} class="{$additional_class}"{/if} itemprop="url"><span itemprop="title">{$bc.title|unescape|strip_tags|escape:"html"}</span></a>
</span>
{else}
{$bc.title|unescape|strip_tags|escape:"html"}
{/if}
{/foreach}
{/strip}
</div>
{/if}

2012年1月20日金曜日

CS-Cart PayPal Express Checkoutボタンを日本語にする

PayPal Express Checkoutを有効にするとカートページにExpress Checkoutボタン現れる。


そのままだと英語圏向けのボタン表示なので日本語向けボタンに変更する。


ボタンはハードコーディングされているので payments/paypal_express.php の134行目付近

if (!empty($_payment_id) && !empty($_SESSION['cart']['products']))  {
    $lang = array(
        'EN' => 'en_US',
        'JP' => 'ja_JP',
    );
    $lang_code = isset($lang[CART_LANGUAGE]) ? $lang[CART_LANGUAGE] : 'en_US';
    $checkout_buttons[] = '
        <html>
        <body>
        <br/>
        <form name="pp_express" action="'. Registry::get('config.current_location') . '/payments/paypal_express.php" method="post">
            <input name="_payment_id" value="'.$_payment_id.'" type="hidden" />
            <input src="https://www.paypal.com/' . $lang_code . '/i/btn/btn_xpressCheckout.gif" type="image" />
            <input name="mode" value="express" type="hidden" />
        </form>
        </body>
        </html>';

CS-Cart 購入画面のコメント欄を削除する

skins/basic/customer/addons/my_changes/hooks/checkout/notes.override.tpl

{* $Id: customer_notes.tpl 9403 2010-05-07 13:11:06Z klerik $ *}
<!-- //-->


2012年1月11日水曜日

CS-Cart 携帯電話対応アドオンでPHP Noticeエラー

携帯電話対応アドオンを有効後、端末でアクセスするとDIR_SKINS定数を再定義するようでNoticeエラーが発生する
PHP Notice:  Constant DIR_SKINS already defined in /var/www/html/config.php on line 41
if (!defined(DIR_SKINS))という感じでとりあえず回避