Ignore:
Timestamp:
2013/05/02 18:11:36 (11 years ago)
Author:
h_yoshimoto
Message:

#2236 2.12.3リリース以降の2.12-devへのコミット差し戻し

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/products/LC_Page_Products_List.php

    r22607 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Products_List extends LC_Page_Ex  
    35 { 
     34class LC_Page_Products_List extends LC_Page_Ex { 
    3635 
    3736    // {{{ properties 
     
    6968     * @return void 
    7069     */ 
    71     function init() 
    72     { 
     70    function init() { 
    7371        parent::init(); 
    7472 
     
    8583     * @return void 
    8684     */ 
    87     function process() 
    88     { 
     85    function process() { 
    8986        parent::process(); 
    9087        $this->action(); 
     
    9794     * @return void 
    9895     */ 
    99     function action() 
    100     { 
     96    function action() { 
    10197 
    10298        $objProduct = new SC_Product_Ex(); 
     
    147143        } 
    148144 
    149         $this->tpl_rnd = SC_Utils_Ex::sfGetRandomString(3); 
     145        $this->tpl_rnd          = SC_Utils_Ex::sfGetRandomString(3); 
     146 
     147 
    150148    } 
    151149 
     
    155153     * @return void 
    156154     */ 
    157     function destroy() 
    158     { 
     155    function destroy() { 
    159156        parent::destroy(); 
    160157    } 
     
    165162     * @return integer カテゴリID 
    166163     */ 
    167     function lfGetCategoryId($category_id) 
    168     { 
     164    function lfGetCategoryId($category_id) { 
    169165 
    170166        // 指定なしの場合、0 を返す 
     
    190186 
    191187    /* 商品一覧の表示 */ 
    192     function lfGetProductsList($searchCondition, $disp_number, $startno, $linemax, &$objProduct) 
    193     { 
     188    function lfGetProductsList($searchCondition, $disp_number, $startno, $linemax, &$objProduct) { 
    194189 
    195190        $arrOrderVal = array(); 
     
    229224                    ,product_id DESC 
    230225__EOS__; 
    231                 $objQuery->setOrder($order); 
     226                    $objQuery->setOrder($order); 
    232227                break; 
    233228        } 
     
    249244 
    250245    /* 入力内容のチェック */ 
    251     function lfCheckError($product_id, &$arrForm, $tpl_classcat_find1, $tpl_classcat_find2) 
    252     { 
     246    function lfCheckError($product_id, &$arrForm, $tpl_classcat_find1, $tpl_classcat_find2) { 
    253247 
    254248        // 入力データを渡す。 
     
    274268     * @return void 
    275269     */ 
    276     function lfGetDisplayNum($display_number) 
    277     { 
     270    function lfGetDisplayNum($display_number) { 
    278271        // 表示件数 
    279272        return (SC_Utils_Ex::sfIsInt($display_number)) 
     
    287280     * @return str 
    288281     */ 
    289     function lfGetPageTitle($mode, $category_id = 0) 
    290     { 
     282    function lfGetPageTitle($mode, $category_id = 0) { 
    291283        if ($mode == 'search') { 
    292284            return '検索結果'; 
     
    294286            return '全商品'; 
    295287        } else { 
    296             $objCategory = new SC_Helper_Category_Ex(); 
    297             $arrCat = $objCategory->get($category_id); 
    298             return $arrCat['category_name']; 
     288            $arrCat = SC_Helper_DB_Ex::sfGetCat($category_id); 
     289            return $arrCat['name']; 
    299290        } 
    300291    } 
     
    305296     * @return array 
    306297     */ 
    307     function lfGetSearchConditionDisp($arrSearchData) 
    308     { 
     298    function lfGetSearchConditionDisp($arrSearchData) { 
    309299        $objQuery   =& SC_Query_Ex::getSingletonInstance(); 
    310300        $arrSearch  = array('category' => '指定なし', 'maker' => '指定なし', 'name' => '指定なし'); 
     
    316306        // メーカー検索条件 
    317307        if (strlen($arrSearchData['maker_id']) > 0) { 
    318             $objMaker = new SC_Helper_Maker_Ex(); 
    319             $maker = $objMaker->get($arrSearchData['maker_id']); 
    320             $arrSearch['maker']     = $maker['name']; 
     308            $arrSearch['maker']     = $objQuery->get('name', 'dtb_maker', 'maker_id = ?', array($arrSearchData['maker_id'])); 
    321309        } 
    322310 
     
    333321     * @return int 
    334322     */ 
    335     function lfGetProductAllNum($searchCondition) 
    336     { 
     323    function lfGetProductAllNum($searchCondition) { 
    337324        // 検索結果対象となる商品の数を取得 
    338325        $objQuery   =& SC_Query_Ex::getSingletonInstance(); 
     
    347334     * @return array 
    348335     */ 
    349     function lfGetSearchCondition($arrSearchData) 
    350     { 
     336    function lfGetSearchCondition($arrSearchData) { 
    351337        $searchCondition = array( 
    352338            'where'             => '', 
     
    391377        } 
    392378 
     379        $searchCondition['where_for_count'] = $searchCondition['where']; 
     380 
    393381        // 在庫無し商品の非表示 
    394382        if (NOSTOCK_HIDDEN) { 
    395383            $searchCondition['where'] .= ' AND EXISTS(SELECT * FROM dtb_products_class WHERE product_id = alldtl.product_id AND del_flg = 0 AND (stock >= 1 OR stock_unlimited = 1))'; 
    396         } 
    397  
    398         // XXX 一時期内容が異なっていたことがあるので別要素にも格納している。 
    399         $searchCondition['where_for_count'] = $searchCondition['where']; 
     384            $searchCondition['where_for_count'] .= ' AND EXISTS(SELECT * FROM dtb_products_class WHERE product_id = alldtl.product_id AND del_flg = 0 AND (stock >= 1 OR stock_unlimited = 1))'; 
     385        } 
    400386 
    401387        return $searchCondition; 
     
    407393     * @return str 
    408394     */ 
    409     function lfSetSelectedData(&$arrProducts, $arrForm, $arrErr, $product_id) 
    410     { 
     395    function lfSetSelectedData(&$arrProducts, $arrForm, $arrErr, $product_id) { 
    411396        $js_fnOnLoad = ''; 
    412397        foreach ($arrProducts as $key => $value) { 
     
    429414     * @return void 
    430415     */ 
    431     function lfAddCart($arrForm, $referer) 
    432     { 
     416    function lfAddCart($arrForm, $referer) { 
    433417        $product_class_id = $arrForm['product_class_id']; 
    434418        $objCartSess = new SC_CartSession_Ex(); 
     
    444428     * @return Array $arrProducts 商品一覧情報 
    445429     */ 
    446     function setStatusDataTo($arrProducts, $arrStatus, $arrStatusImage) 
    447     { 
     430    function setStatusDataTo($arrProducts, $arrStatus, $arrStatusImage) { 
    448431 
    449432        foreach ($arrProducts['productStatus'] as $product_id => $arrValues) { 
     
    465448    /** 
    466449     * 
    467      * @return void 
    468      */ 
    469     function doJson() 
    470     { 
     450     * @param type $objProduct  
     451     * @return void 
     452     */ 
     453    function doJson(&$objProduct) { 
    471454        $this->arrProducts = $this->setStatusDataTo($this->arrProducts, $this->arrSTATUS, $this->arrSTATUS_IMAGE); 
    472         SC_Product_Ex::setPriceTaxTo($this->arrProducts); 
     455        $this->arrProducts = $objProduct->setPriceTaxTo($this->arrProducts); 
    473456 
    474457        // 一覧メイン画像の指定が無い商品のための処理 
     
    486469     * @return void 
    487470     */ 
    488     function doDefault(&$objProduct) 
    489     { 
     471    function doDefault(&$objProduct) { 
    490472        //商品一覧の表示処理 
    491473        $strnavi            = $this->objNavi->strnavi; 
     
    536518                $this->lfAddCart($this->arrForm, $_SERVER['HTTP_REFERER']); 
    537519 
    538                 // 開いているカテゴリーツリーを維持するためのパラメーター 
    539                 $arrQueryString = array( 
    540                     'category_id' => $this->arrForm['category_id'], 
    541                 ); 
    542  
    543                 SC_Response_Ex::sendRedirect(CART_URLPATH, $arrQueryString); 
     520 
     521                SC_Response_Ex::sendRedirect(CART_URLPATH); 
    544522                SC_Response_Ex::actionExit(); 
    545523            } 
     
    552530        } 
    553531 
    554         $this->tpl_javascript   .= 'function fnOnLoad() 
    555         {' . $js_fnOnLoad . '}'; 
     532        $this->tpl_javascript   .= 'function fnOnLoad(){' . $js_fnOnLoad . '}'; 
    556533        $this->tpl_onload       .= 'fnOnLoad(); '; 
    557534    } 
Note: See TracChangeset for help on using the changeset viewer.