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/mypage/LC_Page_Mypage_Favorite.php

    r22567 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_MyPage_Favorite extends LC_Page_AbstractMypage_Ex  
    35 { 
     34class LC_Page_MyPage_Favorite extends LC_Page_AbstractMypage_Ex { 
    3635 
    3736    // {{{ properties 
     
    4847     * @return void 
    4948     */ 
    50     function init() 
    51     { 
     49    function init() { 
    5250        parent::init(); 
    5351        $this->tpl_subtitle = 'お気に入り一覧'; 
     
    6058     * @return void 
    6159     */ 
    62     function process() 
    63     { 
     60    function process() { 
    6461        parent::process(); 
    6562    } 
     
    7067     * @return void 
    7168     */ 
    72     function action() 
    73     { 
     69    function action() { 
     70 
     71        $objProduct  = new SC_Product_Ex(); 
    7472        $objCustomer = new SC_Customer_Ex(); 
    75  
    7673        $customer_id = $objCustomer->getValue('customer_id'); 
    7774 
     
    8178                $this->lfDeleteFavoriteProduct($customer_id, intval($_POST['product_id'])); 
    8279                break; 
    83  
    8480            case 'getList': 
    8581                // スマートフォン版のもっと見るボタン用 
     
    8985                } 
    9086                $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this); 
    91                 SC_Product_Ex::setPriceTaxTo($this->arrFavorite); 
     87                $this->arrFavorite = $objProduct->setPriceTaxTo($this->arrFavorite); 
     88 
    9289 
    9390                echo SC_Utils_Ex::jsonEncode($this->arrFavorite); 
    9491                SC_Response_Ex::actionExit(); 
    95                 break; 
    96  
    97             default: 
    9892                break; 
    9993        } 
     
    115109     * @return void 
    116110     */ 
    117     function destroy() 
    118     { 
     111    function destroy() { 
    119112        parent::destroy(); 
    120113    } 
     
    128121     * @return array お気に入り商品一覧 
    129122     */ 
    130     function lfGetFavoriteProduct($customer_id, &$objPage) 
    131     { 
     123    function lfGetFavoriteProduct($customer_id, &$objPage) { 
    132124        $objQuery       = SC_Query_Ex::getSingletonInstance(); 
    133125        $objProduct     = new SC_Product_Ex(); 
    134126 
    135         $objQuery->setOrder('f.create_date DESC'); 
    136         $where = 'f.customer_id = ? and p.status = 1'; 
     127        $objQuery->setOrder('create_date DESC'); 
     128        $where = 'customer_id = ?'; 
    137129        if (NOSTOCK_HIDDEN) { 
    138130            $where .= ' AND EXISTS(SELECT * FROM dtb_products_class WHERE product_id = dtb_customer_favorite_products.product_id AND del_flg = 0 AND (stock >= 1 OR stock_unlimited = 1))'; 
    139131        } 
    140         $arrProductId  = $objQuery->getCol('f.product_id', 'dtb_customer_favorite_products f inner join dtb_products p using (product_id)', $where, array($customer_id)); 
     132        $arrProductId  = $objQuery->getCol('product_id', 'dtb_customer_favorite_products', $where, array($customer_id)); 
    141133 
    142134        $objQuery       =& SC_Query_Ex::getSingletonInstance(); 
     
    178170 
    179171    /* 仕方がない処理。。 */ 
    180     function lfMakeWhere($tablename, $arrProductId) 
    181     { 
     172    function lfMakeWhere($tablename, $arrProductId) { 
    182173 
    183174        // 取得した表示すべきIDだけを指定して情報を取得。 
     
    193184 
    194185    // お気に入り商品削除 
    195     function lfDeleteFavoriteProduct($customer_id, $product_id) 
    196     { 
     186    function lfDeleteFavoriteProduct($customer_id, $product_id) { 
    197187        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    198188 
Note: See TracChangeset for help on using the changeset viewer.