[Tep-j-general] SOLD OUT画像表示について

Back to archive index

wataru sw2w-****@asahi*****
2004年 2月 3日 (火) 15:20:09 JST


初めまして、いつも参考にさせてもらっています。
以前話題に上がっていたのですが
http://lists.sourceforge.jp/mailman/archives/tep-j-general/2003-August/00118
6.html
の方と同様に自分も今すぐ購入ボタンの変わりに在庫切れの商品はsold outのボタン
を表示させたくて挑戦したものの全ての商品がsold outボタンになってしまいまし
た。
以前の質問者の方と同様にcategolg/include/module/product_listing.phpの148行目
辺りを同様にいじってみたのですが…
。以前の質問者の方は['product_quantity']となっていたのを
['products_quantity']と直して解決されたようなのですが初めから
['products_quantity']にしていても自分は解決できませんでした。何が問題なので
しょうか?初心者なもので手も足も出ず参ってます。申し訳ないですがよろしくお願
いします   

杉本
sw2w-****@asahi***** 

変更前
          case 'PRODUCT_LIST_BUY_NOW':
            $lc_align = 'center';
            $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF),
tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' .
$listing['products_id']) . '">' . tep_image_button('button_buy_now.gif',
TEXT_BUY . $listing['products_name'] . TEXT_NOW) . '</a>&nbsp;';
            }
            break;

変更後
          case 'PRODUCT_LIST_BUY_NOW':
            $lc_align = 'center';
   if ($listing['products_quantity'] > 0){
            $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF),
tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' .
$listing['products_id']) . '">' . tep_image_button('button_buy_now.gif',
TEXT_BUY . $listing['products_name'] . TEXT_NOW) . '</a>&nbsp;';
            } else {
            $lc_text = tep_image_button('button_sold_out.gif',
$listing['products_name'] . TEXT_SOLDOUT) . '&nbsp;';
            }
            break;
-------------- next part --------------
HTMLの添付ファイルを保管しました...
Download 


Tep-j-general メーリングリストの案内
Back to archive index