説明
商品をカートに投入するときの、数量入力フィールドを出力します。
使い方
<?php usces_the_itemQuant(); ?>
パラメータ
- $out
- (文字列)戻り値の出力を echo するか return するかを決める。初期値は空文字(echo)。
- ‘return’:return する
- ”(空文字)もしくは未設定:echo する(初期値)
戻り値
- (HTML)
- 数量 input フィールド
- ‘return’:そのまま return
- ”(空文字)もしくは未設定:echo
注意
usces_have_skus() によりSKU情報がセットされていないと表示されません。
用例
<?php while ( have_posts() ) : the_post(); usces_the_item(); ?>
<p>商品名:<?php usces_the_item(); ?></p>
<form action="<?php echo USCES_CART_URL; ?>" method="post">
<?php while ( usces_have_skus() ): ?>
<p>SKU名:<?php usces_the_itemSkuDisp(); ?></p>
<p>数量:<?php usces_the_itemQuant(); ?><?php usces_the_itemSkuUnit(); ?></p>
<p><?php usces_the_itemSkuButton( 'カートに入れる' ); ?></p>
<?php endwhile; ?>
</form>
<?php endwhile; ?>
フック
- usces_filter_the_itemQuant(フィルター)
ソースファイル
usc-e-shop/functions/template_func.php
関連資料
- usces_the_itemSkuUnit() ・・・ 現在のSKUの単位を表示する
- usces_the_itemSkuButton() ・・・ カート投入ボタンを出力する
PAGE TOP