source: branches/comu/html/mobile/mypage/order.php @ 11982

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