Changeset 17983
- Timestamp:
- 2009/04/20 19:16:51 (15 years ago)
- 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 44 44 <!--▲ページナビ--> 45 45 </div> 46 <p>※最大20件まで表示します。</p>47 46 48 47 <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 95 95 } 96 96 97 $sql = "SELECT * 98 FROM 99 (SELECT 97 $col = "*"; 98 $from =" (SELECT 100 99 T2.product_id AS product_id_main, 101 100 T2.del_flg , … … 112 111 FROM 113 112 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 117 114 ) AS T3 INNER JOIN 118 115 (SELECT … … 127 124 product_id 128 125 ) AS T4 ON T3.product_id_main = T4.product_id"; 126 $where = "customer_id = ? AND del_flg = 0 AND status = 1"; 129 127 // 在庫無し商品の非表示 130 128 if (NOSTOCK_HIDDEN === true) { 131 $ sql .= " WHERE stock_max >= 1 OR stock_unlimited_max = 1";132 } 133 $ sql .= " ORDER BYcreate_date DESC";129 $where .= " AND (stock_max >= 1 OR stock_unlimited_max = 1)"; 130 } 131 $order = "create_date DESC"; 134 132 135 133 $arrval = array($objCustomer->getvalue('customer_id')); 136 134 137 //お気に入りの取得138 $this->arrFavorite = $objQuery->getall($sql, $arrval);139 140 135 //お気に入りの数を取得 141 $linemax = count($this->arrFavorite);136 $linemax = $objQuery->count($from, $where, $arrval); 142 137 $this->tpl_linemax = $linemax; 143 138 … … 151 146 // 表示順序 152 147 $objQuery->setorder($order); 148 149 //お気に入りの取得 150 $this->arrFavorite = $objQuery->select($col, $from, $where, $arrval); 153 151 154 152 // パラメータ管理クラス
Note: See TracChangeset
for help on using the changeset viewer.