購入フォームのサンプルが下記コードです。
<form name="product_form" method="post" action="<{$cart_url}>">
<div class="quantity">
<span>数 量</span>
<input type="text" name="product_num" value="<{$product.init_num}>" />
</div>
<button class="cartBtn" type="submit">
<figure class="icon"><img src="https://file003.shop-pro.jp/PA01492/289/assets/img/common/icon-cart.svg" alt="カート"></figure>
<span>カートに入れる</span>
</button>
<{$product.info}>
</form>必須項目はいかになります。
・<form name=”product_form” method=”post” action=”<{$cart_url}>”></form>
・<input type=”text” name=”product_num” value=”<{$product.init_num}>” />
購入数を選択する箇所です。
「{$product.init_num}」は商品の初期設定個数(商品最小個数)です。
valueの値が1でも問題ありません。
・<button class=”cartBtn” type=”submit”></button>
指定された購入数で、購入画面に遷移するためのボタンです。
「 type=”submit”」は必須になります。
・<{$product.info}>
ユーザー識別やショップなどの情報です。