source: branches/dev/html/mobile/mypage/order.php @ 11460

Revision 11460, 1.2 KB checked in by inoue, 17 years ago (diff)

モバイル版EC-CUBE

  • Property svn:eol-style set to native
Line 
1<?
2/*
3 * ÍúÎò¤«¤éÃíʸ¤ò¼èÆÀ¡¦ÅÐÏ¿¤·¡¢¥«¡¼¥È¤ËÁ«°Ü¤¹¤ë¡£
4 */
5require_once("../require.php");
6
7$objCustomer = new SC_Customer();
8$objCartSess = new SC_CartSession();
9
10//¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ
11$arrDisp = lfGetOrderDetail($_POST['order_id']);
12
13//¥í¥°¥¤¥ó¤·¤Æ¤¤¤Ê¤¤¡¢¤Þ¤¿¤ÏDB¤Ë¾ðÊó¤¬Ìµ¤¤¾ì¹ç
14if (!$objCustomer->isLoginSuccess() or count($arrDisp) == 0){
15    sfDispSiteError(CUSTOMER_ERROR);
16}
17
18for($num = 0; $num < count($arrDisp); $num++) {
19    $product_id = $arrDisp[$num]['product_id'];
20    $cate_id1 = $arrDisp[$num]['classcategory_id1'];
21    $cate_id2 = $arrDisp[$num]['classcategory_id2'];
22    $quantity = $arrDisp[$num]['quantity'];
23
24    $objCartSess->addProduct(array($product_id, $cate_id1, $cate_id2), $quantity);
25}
26
27header("Location: " . gfAddSessionId(URL_CART_TOP));
28
29
30//-----------------------------------------------------------------------------------------------------------------------------------
31// ¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ
32function lfGetOrderDetail($order_id) {
33    $objQuery = new SC_Query();
34    $col = "product_id, classcategory_id1, classcategory_id2, quantity";
35    $where = "order_id = ?";
36    $objQuery->setorder("classcategory_id1, classcategory_id2");
37    $arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id));
38    return $arrRet;
39}
40
41?>
Note: See TracBrowser for help on using the repository browser.