Changeset 22608
- Timestamp:
- 2013/03/06 16:46:31 (11 years ago)
- Location:
- branches/version-2_12-dev/data
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/Smarty/templates/default/cart/index.tpl
r22579 r22608 76 76 <input type="hidden" name="cartKey" value="<!--{$key|h}-->" /> 77 77 <input type="hidden" name="category_id" value="<!--{$tpl_category_id|h}-->" /> 78 <input type="hidden" name="product_id" value="<!--{$tpl_product_id|h}-->" /> 78 79 <!--{if count($cartKeys) > 1}--> 79 80 <h3><!--{$arrProductType[$key]|h}--></h3> -
branches/version-2_12-dev/data/class/pages/cart/LC_Page_Cart.php
r22604 r22608 108 108 } 109 109 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 110 124 switch ($this->mode) { 111 125 case 'confirm': … … 126 140 $objCartSess->upQuantity($cart_no, $cartKey); 127 141 128 129 SC_Response_Ex::reload(array('category_id' => $objFormParam->getValue('category_id')), true); 142 SC_Response_Ex::reload($arrQueryString, true); 130 143 SC_Response_Ex::actionExit(); 131 144 break; … … 133 146 $objCartSess->downQuantity($cart_no, $cartKey); 134 147 135 136 SC_Response_Ex::reload(array('category_id' => $objFormParam->getValue('category_id')), true); 148 SC_Response_Ex::reload($arrQueryString, true); 137 149 SC_Response_Ex::actionExit(); 138 150 break; … … 140 152 $objCartSess->setQuantity($objFormParam->getValue('quantity'), $cart_no, $cartKey); 141 153 142 143 SC_Response_Ex::reload(array('category_id' => $objFormParam->getValue('category_id')), true); 154 SC_Response_Ex::reload($arrQueryString, true); 144 155 SC_Response_Ex::actionExit(); 145 156 break; … … 147 158 $objCartSess->delProduct($cart_no, $cartKey); 148 159 149 150 SC_Response_Ex::reload(array('category_id' => $objFormParam->getValue('category_id')), true); 160 SC_Response_Ex::reload($arrQueryString, true); 151 161 SC_Response_Ex::actionExit(); 152 162 break; … … 177 187 $this->tpl_all_total_inctax = $totalIncTax; 178 188 179 $this->tpl_category_id = $objFormParam->getValue('category_id'); 189 $this->tpl_category_id = 190 $objFormParam4OpenCategoryTree->getValue('category_id'); 191 $this->tpl_product_id = 192 $objFormParam4OpenCategoryTree->getValue('product_id'); 180 193 181 194 // ログイン判定 … … 217 230 $objFormParam->addParam('カートキー', 'cartKey', INT_LEN, 'n', array('NUM_CHECK','MAX_LENGTH_CHECK')); 218 231 $objFormParam->addParam('カートナンバー', 'cart_no', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 219 // PC版での値引き継ぎ用220 $objFormParam->addParam('カテゴリID', 'category_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));221 232 // スマートフォン版での数量変更用 222 233 $objFormParam->addParam('数量', 'quantity', INT_LEN, 'n', array('ZERO_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); 234 // 値の取得 235 $objFormParam->setParam($arrRequest); 236 // 入力値の変換 237 $objFormParam->convParam(); 238 return $objFormParam; 239 } 240 241 /** 242 * PC版での開いているカテゴリーツリーの維持用の入力値 243 * 244 * @return object 245 */ 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 223 255 // 値の取得 224 256 $objFormParam->setParam($arrRequest); -
branches/version-2_12-dev/data/class/pages/products/LC_Page_Products_Detail.php
r22567 r22608 517 517 $objCartSess->addProduct($product_class_id, $this->objFormParam->getValue('quantity')); 518 518 519 520 SC_Response_Ex::sendRedirect(CART_URLPATH); 519 // 開いているカテゴリーツリーを維持するためのパラメーター 520 $arrQueryString = array( 521 'product_id' => $this->objFormParam->getValue('product_id'), 522 ); 523 524 SC_Response_Ex::sendRedirect(CART_URLPATH, $arrQueryString); 521 525 SC_Response_Ex::actionExit(); 522 526 }
Note: See TracChangeset
for help on using the changeset viewer.