{if $action.dl_price_free}
  <p>
    <img src="img/dl/freedl_setumei_last.jpg">
  </p>
{/if}

  <table border="0" cellspacing="0" cellpadding="0" class="entryform">
    <tr>
      <td colspan="2" class="non2">▼お届け先に間違いはありませんか？&nbsp;&nbsp;
        <input name="dispatch_customer_itembuy_cashier_destination" type="image" src="img/change_btn.gif" alt="変更" /></td>
    </tr>
    <tr>
      <th>お名前</th>
      <td>{$destination.addressee|escape}</td>
    </tr>
    <tr>
      <th>郵便番号</th>
      <td>{$destination.post|escape}</td>
    </tr>
    <tr>
      <th>都道府県</th>
      <td>{$destination.pref|escape}</td>
    </tr>
    <tr>
      <th>住所１</th>
      <td>{$destination.address1|escape}</td>
    </tr>
    <tr>
      <th>住所２</th>
      <td>{$destination.address2|escape}</td>
    </tr>
    <tr>
      <th>電話番号１</th>
      <td>{$destination.tel|escape}</td>
    </tr>

    <tr>
      <td colspan="2" class="non2">▼お支払い方法に間違いはありませんか？&nbsp;&nbsp;
        <input name="dispatch_customer_itembuy_cashier_payment" type="image" src="img/change_btn.gif" alt="変更" /></td>
    </tr>
    <tr>
      <th>お支払い方法</th>
      <td>
{if $action.dl_price_free}
         --
{else}
         {if $payment[0] == 1}カード{/if}
         {if $payment[0] == 2}代金引換{/if}
         {if $payment[0] == 3}銀行振込み{/if}
         {if $payment[0] == 4}コンビニ決済{/if}
         {if $payment[0] == 5}郵便振替{/if}
{/if}
      </td>
    </tr>
{if $payment[0] == 1}
    <tr>
{if $smarty.const.PAY_MERCHANT=='veritrans'}
      <th>カード会社 </th>
      <td>
          {if $payment[1] == 1}VISA{/if}
          {if $payment[1] == 2}MASTER{/if}
          {if $payment[1] == 3}NICOS{/if}
          {if $payment[1] == 4}JCB{/if}
          {if $payment[1] == 5}アメックス{/if}
      </td>
    </tr>
    <tr>
      <th>カード情報 </th>
      <td><p>{action->getCardNumberHide|escape}<br />
        {$payment[3]|escape}<br />
        有効期限&nbsp;{$payment[4]|escape}年{$payment[5]|escape}月</p>
      </td>
{else}
      <th>カード情報</th>
{if $action.dl_price_free}
      <td>カード情報の入力はありません。</td>
{else}
      <td>次の画面にて入力します。</td>
{/if}

{/if}
    </tr>
{/if}
{if $payment[0] == 2}
    <tr>
      <th>お届け </th>
      <td>ヤマト運輸</td>
    </tr>
    <tr>
      <th>お支払い方法 </th>
      <td>現金（クレジット払い不可）</td>
    </tr>
{/if}
{if $payment[0] == 3}
    <tr>
      <th>お振込先 </th>
      <td>次の画面で表示されます</td>
    </tr>
    <tr>
      <th>口座番号</th>
      <td>次の画面で表示されます</td>
    </tr>
{/if}
{if $payment[0] == 5}
    <tr>
      <th>お支払い方法</th>
      <td>商品に同封している振替用紙にてお支払いとなります。<br />
        振替用紙を最寄の郵便局にお持ちいただき、 ご購入された金額をお振込ください。<br />
        振替手数料は{if $smarty.const.SITE_YUUBIN > 0}{$smarty.const.SITE_YUUBIN}円{else}無料{/if}です！</td>
    </tr>
{/if}
{if $payment[0] == 4}
    <tr>
      <th>コンビニ店指定</th>
      <td>
          {if $payment[9] == 1}セブンイレブン{/if}
          {if $payment[9] == 2}ローソン・セイコーマート{/if}
          {if $payment[9] == 3}ファミリーマート{/if}
          {if $payment[9] == 4}サークルKサンクス・デイリーヤマザキ・ヤマザキデイリーストアー・タイムリー・ミニストップ{/if}
      </td>
    </tr>
    <tr>
      <th>姓</th>
      <td>
        {$payment[10]|escape}
      </td>
    </tr>
    <tr>
      <th>名</th>
      <td>
        {$payment[11]|escape}
      </td>
    </tr>
    <tr>
      <th>姓(カナ)</th>
      <td>
        {$payment[12]|escape}
      </td>
    </tr>
    <tr>
      <th>名(カナ)</th>
      <td>
        {$payment[13]|escape}
      </td>
    </tr>
    <tr>
      <th>電話番号</th>
      <td>
        {$payment[14]|escape}
      </td>
    </tr>
{/if}
  </table>

  <table border="0" cellspacing="0" cellpadding="0" class="entryform">
    <tr>
      <th>備考 </th>
      <td>
        <textarea name="note" cols="60" rows="10">{$action.buynote}</textarea>
      </td>
    </tr>
  </table>


  <table border="0" cellspacing="0" cellpadding="0" class="cartcheck">
    <tr>
      <td colspan="4" class="non2">▼カートの内容に間違いはありませんか？&nbsp;&nbsp;
      <input type="image" onclick="javascript:location.href='?action=customer_itembuy_cart'; return false;" src="img/change_btn.gif" alt="変更" /></td>
    </tr>

{foreach from=$cart_items item=carts key=k}
{* 在庫データ *}
{if $k==0}

    <tr>
      <th>商品名（すぐに発送可能です）</th>
      <th>単価</th>
      <th>数量</th>
      <th>小計</th>
    </tr>
{foreach from=$carts item=cart_item key=l}
    <tr>
      <td>{$cart_item[4]|escape}</td>
      <td>{$cart_item[5]|escape|number_format} 円</td>
      <td>{$cart_item[3]|escape|number_format} </td>
      <td>{$cart_item[11]|escape|number_format} 円</td>
    </tr>
{/foreach}

{counter start=2 skip=1 name=r1 assign=r1}
{if $action.pricedata.$k.daibiki!="" || $action.pricedata.$k.yuubin!=""}{counter name=r1}{/if}
    <tr>
      <td colspan="2" rowspan="{$r1}">&nbsp </td>
      <td class="regi">送料</td>
      <td class="regi">{$action.pricedata.$k.souryouprc|number_format} 円</td>
    </tr>
{if $action.pricedata.$k.daibiki!=""}
    <tr>
      <td class="regi">代引手数料：</td>
      <td class="regi">{$action.pricedata.$k.daibiki|number_format} 円</td>
    </tr>
{/if}
{if $action.pricedata.$k.yuubin!=""}
    <tr>
      <td class="regi">郵便振替手数料：</td>
      <td class="regi">{$action.pricedata.$k.yuubin|number_format} 円</td>
    </tr>
{/if}
    <tr>
      <td class="regi">小計：</td>
      <td class="regi">{$action.pricedata.$k.totalprice|number_format} 円</td>
    </tr>

{* 予約データ *}
{elseif $k==1}
    <tr>
      <th>商品名（在庫が入り次第発送します）</th>
      <th>単価</th>
      <th>数量</th>
      <th>小計</th>
    </tr>
{foreach from=$carts item=cart_item key=l}
    <tr>
      <td>{$cart_item[4]|escape}</td>
      <td>{$cart_item[5]|escape|number_format} 円</td>
      <td>{$cart_item[3]|escape|number_format} </td>
      <td>{$cart_item[11]|escape|number_format} 円</td>
    </tr>

{counter start=2 skip=1 name=r2 assign=r2}
{if $action.pricedata.$k.$l.daibiki!="" || $action.pricedata.$k.$l.yuubin!=""}{counter name=r2}{/if} 
    <tr>
      <td colspan="2" rowspan="{$r2}">&nbsp </td>
      <td class="regi">送料</td>
      <td class="regi">{$action.pricedata.$k.$l.souryouprc|number_format} 円</td>
    </tr>
{if $action.pricedata.$k.$l.daibiki!=""} 
    <tr> 
      <td class="regi">代引手数料：</td> 
      <td class="regi">{$action.pricedata.$k.$l.daibiki|number_format} 円</td> 
    </tr> 
{/if} 
{if $action.pricedata.$k.$l.yuubin!=""} 
    <tr> 
      <td class="regi">郵便振替手数料：</td> 
      <td class="regi">{$action.pricedata.$k.$l.yuubin|number_format} 円</td> 
    </tr> 
{/if}
    <tr>
      <td class="regi">小計：</td>
      <td class="regi">{$action.pricedata.$k.$l.totalprice|number_format} 円</td>
    </tr>
{/foreach}

{* 出品データ *}
{elseif $k==2}

{foreach from=$carts item=seller key=sellercd}
    <tr>
      <th>商品名（出品商品です）</th>
      <th>単価</th>
      <th>数量</th>
      <th>小計</th>
    </tr>
{foreach from=$seller item=sellitem}
    <tr>
      <td>
        {$sellitem[4]|escape}
        <p>出品者：{$sellitem[8]|escape}</p>
      </td>
      <td>{$sellitem[5]|escape|number_format} 円</td>
      <td>{$sellitem[3]|escape|number_format} </td>
      <td>{$sellitem[11]|escape|number_format} 円</td>
    </tr>
{/foreach}

{counter start=2 skip=1 name=r3 assign=r3}
{if $action.pricedata.$k.$sellercd.daibiki!="" || $action.pricedata.$k.$sellercd.yuubin!=""}{counter name=r3}{/if}
    <tr>
      <td colspan="2" rowspan="{$r3}">&nbsp </td>
      <td class="regi">送料</td>
      <td class="regi">{$action.pricedata.$k.$sellercd.souryouprc|number_format} 円</td>
    </tr>
{if $action.pricedata.$k.$sellercd.daibiki!=""} 
    <tr> 
      <td class="regi">代引手数料：</td> 
      <td class="regi">{$action.pricedata.$k.$sellercd.daibiki|number_format} 円</td> 
    </tr> 
{/if} 
{if $action.pricedata.$k.$sellercd.yuubin!=""} 
    <tr> 
      <td class="regi">郵便振替手数料：</td> 
      <td class="regi">{$action.pricedata.$k.$sellercd.yuubin|number_format} 円</td> 
    </tr> 
{/if} 
    <tr>
      <td class="regi">小計：</td>
      <td class="regi">{$action.pricedata.$k.$sellercd.totalprice|number_format} 円</td>
    </tr>
{/foreach}

{* ダウンロードデータ *}
{elseif $k==3}

    <tr>
      <th>商品名（ダウンロード商品です）</th>
      <th>単価</th>
      <th>数量</th>
      <th>小計</th>
    </tr>
{foreach from=$carts item=cart_item key=l}
    <tr>
      <td>{$cart_item[4]|escape}</td>
      <td>{$cart_item[5]|escape|number_format} 円</td>
      <td>{$cart_item[3]|escape|number_format} </td>
      <td>{$cart_item[11]|escape|number_format} 円</td>
    </tr>

{counter start=1 skip=1 name=r3 assign=r3}
    <tr>
      <td colspan="2" rowspan="{$r3}">&nbsp </td>
      <td class="regi">小計：</td>
      <td class="regi">{$action.pricedata.$k.$l.totalprice|number_format} 円</td>
    </tr>
{/foreach}

{/if}

{/foreach}
    <tr>
      <td colspan="2" class="fix">
{if $smarty.const.PAY_MERCHANT!='veritrans' && ($payment[0] == 1 || $payment[0] == 4)}
{if $action.dl_price_free}
        無料ダウンロードの&nbsp;&nbsp;
{else}
        注文はまだ確定しません&nbsp;&nbsp;
{/if}
        <input name="entry_button" type="image" src="img/fix_btn.gif" alt="確定" />
{else}
        注文を確定します&nbsp;&nbsp;
        <input name="entry_button" type="image" src="img/fix_btn.gif" alt="変更" />
{/if}
      </td>
      <td class="total regi">合計</td>
      <td class="total regi">{$action.totalprice|number_format} 円</td>
    </tr>
  </table>
