Changeset 17983


Ignore:
Timestamp:
2009/04/20 19:16:51 (15 years ago)
Author:
kajiwara
Message:

#441 ページ送り処理が正常に動作していない不具合を修正。(最大20件というしばりがないため文言も削除)

Location:
branches/version-2_4/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_4/data/Smarty/templates/default/mypage/favorite.tpl

    r17981 r17983  
    4444      <!--▲ページナビ--> 
    4545    </div> 
    46     <p>※最大20件まで表示します。</p> 
    4746 
    4847    <form name="form1" id="form1" method="post" action="<!--{$smarty.const.SITE_URL}-->products/detail.php"> 
  • branches/version-2_4/data/class/pages/mypage/LC_Page_Mypage_Favorite.php

    r17980 r17983  
    9595        } 
    9696 
    97         $sql = "SELECT * 
    98                 FROM 
    99                    (SELECT 
     97        $col = "*"; 
     98        $from =" (SELECT 
    10099                        T2.product_id AS product_id_main, 
    101100                        T2.del_flg , 
     
    112111                        FROM 
    113112                           dtb_customer_favorite_products 
    114                         WHERE 
    115                            customer_id = ? 
    116                         ) AS T1 INNER JOIN dtb_products AS T2 ON T1.product_id_c = T2.product_id AND T2.del_flg = 0 AND T2.status = 1 
     113                        ) AS T1 INNER JOIN dtb_products AS T2 ON T1.product_id_c = T2.product_id 
    117114                    ) AS T3 INNER JOIN 
    118115                        (SELECT 
     
    127124                            product_id 
    128125                    ) AS T4 ON T3.product_id_main = T4.product_id"; 
     126        $where = "customer_id = ? AND del_flg = 0 AND status = 1"; 
    129127        // 在庫無し商品の非表示 
    130128        if (NOSTOCK_HIDDEN === true) { 
    131             $sql .= " WHERE stock_max >= 1 OR stock_unlimited_max = 1"; 
    132         } 
    133         $sql .= " ORDER BY create_date DESC"; 
     129            $where .= " AND (stock_max >= 1 OR stock_unlimited_max = 1)"; 
     130        } 
     131        $order = "create_date DESC"; 
    134132 
    135133        $arrval = array($objCustomer->getvalue('customer_id')); 
    136134 
    137         //お気に入りの取得 
    138         $this->arrFavorite = $objQuery->getall($sql, $arrval); 
    139  
    140135        //お気に入りの数を取得 
    141         $linemax = count($this->arrFavorite); 
     136        $linemax = $objQuery->count($from, $where, $arrval); 
    142137        $this->tpl_linemax = $linemax; 
    143138 
     
    151146        // 表示順序 
    152147        $objQuery->setorder($order); 
     148 
     149        //お気に入りの取得 
     150        $this->arrFavorite = $objQuery->select($col, $from, $where, $arrval); 
    153151 
    154152        // パラメータ管理クラス 
Note: See TracChangeset for help on using the changeset viewer.