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 | */ |
---|
11 | require_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¤Ë¾ðÊó¤¬Ìµ¤¤¾ì¹ç |
---|
20 | if (!$objCustomer->isLoginSuccess() or count($arrDisp) == 0){ |
---|
21 | sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); |
---|
22 | } |
---|
23 | |
---|
24 | for($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 | |
---|
33 | header("Location: " . gfAddSessionId(MOBILE_URL_CART_TOP)); |
---|
34 | |
---|
35 | |
---|
36 | //----------------------------------------------------------------------------------------------------------------------------------- |
---|
37 | // ¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ |
---|
38 | function 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 | ?> |
---|