- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/cart/LC_Page_Cart.php
r22608 r22796 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Cart extends LC_Page_Ex 35 { 34 class LC_Page_Cart extends LC_Page_Ex { 36 35 37 36 // {{{ properties … … 54 53 * @return void 55 54 */ 56 function init() 57 { 55 function init() { 58 56 parent::init(); 59 57 $this->tpl_title = '現在のカゴの中'; … … 68 66 * @return void 69 67 */ 70 function process() 71 { 68 function process() { 72 69 parent::process(); 73 70 $this->action(); … … 80 77 * @return void 81 78 */ 82 function action() 83 { 79 function action() { 84 80 85 81 $objCartSess = new SC_CartSession_Ex(); … … 108 104 } 109 105 110 $objFormParam4OpenCategoryTree =111 $this->lfInitParam4OpenCategoryTree($_REQUEST);112 if ($objFormParam4OpenCategoryTree->getValue('product_id')) {113 $arrQueryString = array(114 'product_id' => $objFormParam4OpenCategoryTree->getValue(115 'product_id'),116 );117 } else {118 $arrQueryString = array(119 'category_id' => $objFormParam4OpenCategoryTree->getValue(120 'category_id'),121 );122 }123 124 106 switch ($this->mode) { 125 107 case 'confirm': … … 140 122 $objCartSess->upQuantity($cart_no, $cartKey); 141 123 142 SC_Response_Ex::reload($arrQueryString, true); 124 125 SC_Response_Ex::reload(array('category_id' => $objFormParam->getValue('category_id')), true); 143 126 SC_Response_Ex::actionExit(); 144 127 break; … … 146 129 $objCartSess->downQuantity($cart_no, $cartKey); 147 130 148 SC_Response_Ex::reload($arrQueryString, true); 131 132 SC_Response_Ex::reload(array('category_id' => $objFormParam->getValue('category_id')), true); 149 133 SC_Response_Ex::actionExit(); 150 134 break; … … 152 136 $objCartSess->setQuantity($objFormParam->getValue('quantity'), $cart_no, $cartKey); 153 137 154 SC_Response_Ex::reload($arrQueryString, true); 138 139 SC_Response_Ex::reload(array('category_id' => $objFormParam->getValue('category_id')), true); 155 140 SC_Response_Ex::actionExit(); 156 141 break; … … 158 143 $objCartSess->delProduct($cart_no, $cartKey); 159 144 160 SC_Response_Ex::reload($arrQueryString, true); 145 146 SC_Response_Ex::reload(array('category_id' => $objFormParam->getValue('category_id')), true); 161 147 SC_Response_Ex::actionExit(); 162 148 break; … … 187 173 $this->tpl_all_total_inctax = $totalIncTax; 188 174 189 $this->tpl_category_id = 190 $objFormParam4OpenCategoryTree->getValue('category_id'); 191 $this->tpl_product_id = 192 $objFormParam4OpenCategoryTree->getValue('product_id'); 175 $this->tpl_category_id = $objFormParam->getValue('category_id'); 193 176 194 177 // ログイン判定 … … 215 198 * @return void 216 199 */ 217 function destroy() 218 { 200 function destroy() { 219 201 parent::destroy(); 220 202 } … … 225 207 * @return object 226 208 */ 227 function lfInitParam($arrRequest) 228 { 209 function lfInitParam($arrRequest) { 229 210 $objFormParam = new SC_FormParam_Ex(); 230 211 $objFormParam->addParam('カートキー', 'cartKey', INT_LEN, 'n', array('NUM_CHECK','MAX_LENGTH_CHECK')); 231 212 $objFormParam->addParam('カートナンバー', 'cart_no', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 213 // PC版での値引き継ぎ用 214 $objFormParam->addParam('カテゴリID', 'category_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 232 215 // スマートフォン版での数量変更用 233 216 $objFormParam->addParam('数量', 'quantity', INT_LEN, 'n', array('ZERO_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); … … 240 223 241 224 /** 242 * PC版での開いているカテゴリーツリーの維持用の入力値243 *244 * @return object245 */246 function lfInitParam4OpenCategoryTree($arrRequest)247 {248 $objFormParam = new SC_FormParam_Ex();249 250 $objFormParam->addParam('カテゴリID', 'category_id', INT_LEN, 'n',251 array('NUM_CHECK', 'MAX_LENGTH_CHECK'));252 $objFormParam->addParam('商品ID', 'product_id', INT_LEN, 'n',253 array('NUM_CHECK', 'MAX_LENGTH_CHECK'));254 255 // 値の取得256 $objFormParam->setParam($arrRequest);257 // 入力値の変換258 $objFormParam->convParam();259 return $objFormParam;260 }261 262 /**263 225 * order_temp_id の更新 264 226 * 265 227 * @return 266 228 */ 267 function lfUpdateOrderTempid($pre_uniqid,$uniqid) 268 { 229 function lfUpdateOrderTempid($pre_uniqid,$uniqid) { 269 230 $sqlval['order_temp_id'] = $uniqid; 270 231 $where = 'order_temp_id = ?'; … … 282 243 * @return void 283 244 */ 284 function lfGetCartPrevUrl(&$session,$referer) 285 { 245 function lfGetCartPrevUrl(&$session,$referer) { 286 246 if (!preg_match('/cart/', $referer)) { 287 247 if (!empty($session['cart_referer_url'])) { … … 307 267 * @return void 308 268 */ 309 function lfSetCurrentCart(&$objSiteSess, &$objCartSess, $cartKey) 310 { 269 function lfSetCurrentCart(&$objSiteSess, &$objCartSess, $cartKey) { 311 270 // 正常に登録されたことを記録しておく 312 271 $objSiteSess->setRegistFlag();
Note: See TracChangeset
for help on using the changeset viewer.