[EC-CUBE 2.11.2] 新規作成したPHPページからEC-CUBEのカートを利用

EC-CUBEで作成した新規ページ(html/user_data/xxx.php)からカートを利用したい場合の方法です。
とりあえず、商品規格を使用しない場合は以下のようにできると思います。

1.管理画面>商品管理>商品登録 から商品登録を済ませておきます。
2.管理画面>デザイン管理>PC>ページ詳細設定 で、ページを新規作成。
3.コード入力欄に以下のコードをコピペ。

<!--{* 買い物かご *}-->
<!--{* product_id=xx に product_id を設定 *}--></pre>
<form id="form1" action="/products/detail.php?product_id=2" method="post" name="form1"><input type="hidden" name="transactionid" value="<!--{$transactionid}-->" />
 <input type="hidden" name="mode" value="cart" />
 <!--{* value=xx に product_id を設定 *}-->
 <input type="hidden" name="product_id" value="2" />
 <!--{* value=xx に product_class_id を設定 *}-->
 <input id="product_class_id" type="hidden" name="product_class_id" value="10" />
 <input type="hidden" name="favorite_product_id" value="" />
 <input class="box60" type="text" name="quantity" value="1" maxlength="9" />
 <a onmouseover="chgImg('/user_data/packages/default/img/button/btn_cartin_on.jpg','cart');" onmouseout="chgImg('/user_data/packages/default/img/button/btn_cartin.jpg','cart');" href="javascript:void(document.form1.submit())">
 <img id="cart" src="/user_data/packages/default/img/button/btn_cartin.jpg" alt="カゴに入れる" name="cart" /></a></form>
<pre>
<!--{* 買い物かご *}-->

4.カートを張りたい商品の商品詳細ページのソースを表示し、product_id や product_class_id の値を調べて書き換え。

付記)
上記のコードの場合、規格登録を含んだ商品を前提としていません。
規格がある場合は、規格ごとに異なる product_class_id をカートに渡さないといけません。
これを動的に行おうとすると、商品一覧ページや商品詳細ページと同様の処理が必要になると思いますが、
「新規作成したPHPページで特定の商品のカートボタンをつけたい」という場合なら、手動でやっても良いかと思います。
以下のサンプルコードを参考にしてみてください。
規格商品ごとに 商品名や価格、product_class_id の value を書き換えます。

<!--{* 買い物かご *}-->
<!--{* product_id=xx に product_id を設定 *}-->
<form name="form1" id="form1" method="post" action="/products/detail.php?product_id=2">
	<input type="hidden" name="transactionid" value="<!--{$transactionid}-->" />
	<input type="hidden" name="mode" value="cart" />
	<!--{* value=xx に product_id を設定 *}-->
	<input type="hidden" name="product_id" value="2" />
	<!--{* value=xx に product_class_id を設定 *}-->
	<table style="width:auto;"> 
	    <tr> 
	        <th>規格名</th> 
	        <th>価格</th> 
			<th>ご購入</th> 
	    </tr> 
	        <tr> 
	        <td>抹茶: S</td> 
	        <td> 980円</td> 
	   		<td><input type="radio" name="product_class_id" value="1" /></td> 
	    </tr> 
	        <tr> 
	        <td>抹茶: M</td> 
	        <td>1,190円</td> 
	   		<td> <input type="radio" name="product_class_id" value="2" /></td> 
	    </tr> 
	        <tr> 
	        <td>抹茶: L</td> 
	        <td>1,400円</td> 
	   		<td><input type="radio" name="product_class_id" value="3" /> 
			</td> 
	    </tr> 
	        <tr> 
	        <td>チョコ: S</td> 
	        <td>980円</td> 
	   		<td><input type="radio" name="product_class_id" value="64" /></td> 
	    </tr> 
	        <tr> 
	        <td>チョコ: M</td> 
	        <td>1,190円</td> 
	   		<td><input type="radio" name="product_class_id" value="65" /> </td> 
	    </tr> 
	        <tr> 
	        <td>チョコ: L</td> 
	        <td>1,400円</td> 
	   		<td><input type="radio" name="product_class_id" value="66" /></td> 
	    </tr> 
	        <tr> 
	        <td>バニラ: S</td> 
	        <td>980円</td> 
	   		<td><input type="radio" name="product_class_id" value="67" /></td> 
	    </tr> 
	        <tr> 
	        <td>バニラ: M</td> 
	        <td>1,190円</td> 
	   		<td><input type="radio" name="product_class_id" value="68" /></td> 
	    </tr> 
	        <tr> 
	        <td>バニラ: L</td> 
	        <td>1,400円</td> 
	   		<td><input type="radio" name="product_class_id" value="69" /></td> 
	    </tr> 
    </table>
	<input type="hidden" name="favorite_product_id" value="" />
	<input type="text" class="box60" name="quantity" value="1" maxlength="9" style="" />
	<a href="javascript:void(document.form1.submit())" onmouseover="chgImg('/user_data/packages/default/img/button/btn_cartin_on.jpg','cart');" onmouseout="chgImg('/user_data/packages/default/img/button/btn_cartin.jpg','cart');">
	<img src="/user_data/packages/default/img/button/btn_cartin.jpg" alt="カゴに入れる" name="cart" id="cart" /></a>
</form>
<!--{* 買い物かご *}-->