Changeset 18184


Ignore:
Timestamp:
2009/07/10 10:24:33 (15 years ago)
Author:
Seasoft
Message:

モバイルサイトのみに実装されていたMYページからの再注文をPCサイトにも実装。
開発者向けレビューです。テンプレートはコメントアウトしています。

Location:
branches/comu-ver2
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/Smarty/templates/default/mypage/history.tpl

    r17992 r18184  
    3939    <!--{/if}--> 
    4040    </p> 
     41 
     42    <!--{* (開発者向けレビュー) 
     43    <form action="order.php" method="post"> 
     44        <input type="hidden" name="order_id" value="<!--{$arrDisp.order_id}-->"> 
     45        <input type="submit" name="submit" value="再注文"> 
     46    </form> 
     47    *}--> 
    4148 
    4249    <table summary="購入商品詳細"> 
     
    170177      <a href="./<!--{$smarty.const.DIR_INDEX_URL}-->" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/b_back_on.gif','change');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/b_back.gif','change');"><img src="<!--{$TPL_DIR}-->img/common/b_back.gif" width="150" height="30" alt="戻る" name="change" id="change" /></a> 
    171178    </div> 
     179 
    172180  </div> 
    173181</div> 
  • branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_Order.php

    r17969 r18184  
    5252     */ 
    5353    function process() { 
     54        $objCustomer = new SC_Customer(); 
     55        $objCartSess = new SC_CartSession(); 
     56 
     57        //受注詳細データの取得 
     58        $arrDisp = $this->lfGetOrderDetail($_POST['order_id']); 
     59 
     60        //ログインしていない、またはDBに情報が無い場合 
     61        if (!$objCustomer->isLoginSuccess(true) or count($arrDisp) == 0){ 
     62            SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 
     63        } 
     64 
     65        for($num = 0; $num < count($arrDisp); $num++) { 
     66            $product_id = $arrDisp[$num]['product_id']; 
     67            $cate_id1 = $arrDisp[$num]['classcategory_id1']; 
     68            $cate_id2 = $arrDisp[$num]['classcategory_id2']; 
     69            $quantity = $arrDisp[$num]['quantity']; 
     70 
     71            $objCartSess->addProduct(array($product_id, $cate_id1, $cate_id2), $quantity); 
     72        } 
     73        $this->sendRedirect($this->getLocation(URL_CART_TOP)); 
    5474    } 
    5575 
Note: See TracChangeset for help on using the changeset viewer.