Changeset 22946 for branches/version-2_13-dev/data/class/pages/products
- Timestamp:
- 2013/07/07 16:48:59 (11 years ago)
- Location:
- branches/version-2_13-dev/data/class/pages/products
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/pages/products/LC_Page_Products_Detail.php
r22926 r22946 112 112 113 113 // プロダクトIDの正当性チェック 114 $product_id = $this->lfCheckProductId($this->objFormParam->getValue('admin'), $this->objFormParam->getValue('product_id'));114 $product_id = $this->lfCheckProductId($this->objFormParam->getValue('admin'), $this->objFormParam->getValue('product_id')); 115 115 $this->mode = $this->getMode(); 116 116 … … 149 149 // モバイル用 規格選択セレクトボックスの作成 150 150 if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) { 151 $this->lfMakeSelectMobile($this, $product_id, $this->objFormParam->getValue('classcategory_id1'));151 $this->lfMakeSelectMobile($this, $product_id, $this->objFormParam->getValue('classcategory_id1')); 152 152 } 153 153 … … 224 224 = SC_Utils_Ex::sfNoImageMain($this->arrProduct['main_image']); 225 225 226 $this->subImageFlag = $this->lfSetFile($this->objUpFile, $this->arrProduct,$this->arrFile);226 $this->subImageFlag = $this->lfSetFile($this->objUpFile, $this->arrProduct, $this->arrFile); 227 227 //レビュー情報の取得 228 228 $this->arrReview = $this->lfGetReviewData($product_id); … … 240 240 241 241 /* プロダクトIDの正当性チェック */ 242 function lfCheckProductId($admin_mode, $product_id)242 function lfCheckProductId($admin_mode, $product_id) 243 243 { 244 244 // 管理機能からの確認の場合は、非公開の商品も表示する。 … … 283 283 284 284 /* 規格選択セレクトボックスの作成(モバイル) */ 285 function lfMakeSelectMobile(&$objPage, $product_id, $request_classcategory_id1)285 function lfMakeSelectMobile(&$objPage, $product_id, $request_classcategory_id1) 286 286 { 287 287 $classcat_find1 = false; … … 380 380 $arrRecommendData = $objQuery->select('recommend_product_id, comment', 'dtb_recommend_products as t1 left join dtb_products as t2 on t1.recommend_product_id = t2.product_id', 't1.product_id = ? and t2.del_flg = 0 and t2.status = 1', array($product_id)); 381 381 382 $ arrRecommendProductId= array();382 $recommendProductIds = array(); 383 383 foreach ($arrRecommendData as $recommend) { 384 $ arrRecommendProductId[] = $recommend['recommend_product_id'];384 $recommendProductIds[] = $recommend['recommend_product_id']; 385 385 } 386 386 387 387 $objQuery =& SC_Query_Ex::getSingletonInstance(); 388 $arrProducts = $objProduct->getListByProductIds($objQuery, $arrRecommendProductId); 389 390 $arrRecommend = array(); 388 $arrProducts = $objProduct->getListByProductIds($objQuery, $recommendProductIds); 389 391 390 foreach ($arrRecommendData as $key => $arrRow) { 392 391 $arrRecommendData[$key] = array_merge($arrRow, $arrProducts[$arrRow['recommend_product_id']]); … … 397 396 398 397 /* 入力内容のチェック */ 399 function lfCheckError($mode, &$objFormParam,$tpl_classcat_find1 = null ,$tpl_classcat_find2 = null)398 function lfCheckError($mode, &$objFormParam, $tpl_classcat_find1 = null , $tpl_classcat_find2 = null) 400 399 { 401 400 switch ($mode) { … … 429 428 430 429 //商品ごとのレビュー情報を取得する 431 function lfGetReviewData($ id)430 function lfGetReviewData($product_id) 432 431 { 433 432 $objQuery =& SC_Query_Ex::getSingletonInstance(); … … 438 437 $objQuery->setOrder('create_date DESC'); 439 438 $objQuery->setLimit(REVIEW_REGIST_MAX); 440 $arrWhereVal = array($ id);439 $arrWhereVal = array($product_id); 441 440 $arrReview = $objQuery->select($col, $from, $where, $arrWhereVal); 442 441 … … 448 447 * @return $subImageFlag 449 448 */ 450 function lfSetFile($objUpFile, $arrProduct,&$arrFile)449 function lfSetFile($objUpFile, $arrProduct, &$arrFile) 451 450 { 452 451 // DBからのデータを引き継ぐ … … 470 469 * @return void 471 470 */ 472 function lfRegistFavoriteProduct($favorite_product_id, $customer_id)471 function lfRegistFavoriteProduct($favorite_product_id, $customer_id) 473 472 { 474 473 // ログイン中のユーザが商品をお気に入りにいれる処理 … … 604 603 function doMobileSelect2() 605 604 { 606 $this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam,$this->tpl_classcat_find1,$this->tpl_classcat_find2);605 $this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam, $this->tpl_classcat_find1, $this->tpl_classcat_find2); 607 606 608 607 // 規格1が設定されていて、エラーを検出した場合 -
branches/version-2_13-dev/data/class/pages/products/LC_Page_Products_List.php
r22926 r22946 94 94 $objProduct = new SC_Product_Ex(); 95 95 // パラメーター管理クラス 96 $objFormParam = new SC_FormParam_Ex(); 96 $objFormParam = new SC_FormParam_Ex(); 97 97 98 98 // パラメーター情報の初期化 … … 139 139 } 140 140 $this->objNavi = new SC_PageNavi_Ex($this->tpl_pageno, $this->tpl_linemax, $this->disp_number, 'fnNaviPage', NAVI_PMAX, $urlParam, SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE); 141 $this->arrProducts = $this->lfGetProductsList($arrSearchCondition, $this->disp_number, $this->objNavi->start_row, $ this->tpl_linemax, $objProduct);141 $this->arrProducts = $this->lfGetProductsList($arrSearchCondition, $this->disp_number, $this->objNavi->start_row, $objProduct); 142 142 143 143 switch ($this->getMode()) { … … 156 156 /** 157 157 * パラメーター情報の初期化 158 * 158 * 159 159 * @param array $objFormParam フォームパラメータークラス 160 160 * @return void … … 207 207 208 208 /* 商品一覧の表示 */ 209 function lfGetProductsList($searchCondition, $disp_number, $startno, $linemax,&$objProduct)209 function lfGetProductsList($searchCondition, $disp_number, $startno, &$objProduct) 210 210 { 211 211 $arrOrderVal = array(); … … 427 427 { 428 428 $js_fnOnLoad = ''; 429 foreach ( $arrProducts as $key => $value) {429 foreach (array_keys($arrProducts) as $key) { 430 430 if ($arrProducts[$key]['product_id'] == $product_id) { 431 431 $arrProducts[$key]['product_class_id'] = $arrForm['product_class_id']; … … 447 447 * @return void 448 448 */ 449 function lfAddCart($arrForm , $referer)449 function lfAddCart($arrForm) 450 450 { 451 451 $objCartSess = new SC_CartSession_Ex(); … … 555 555 $arrErr = $this->lfCheckError($objFormParam); 556 556 if (empty($arrErr)) { 557 $this->lfAddCart($this->arrForm , $_SERVER['HTTP_REFERER']);557 $this->lfAddCart($this->arrForm); 558 558 559 559 // 開いているカテゴリーツリーを維持するためのパラメーター
Note: See TracChangeset
for help on using the changeset viewer.