Ignore:
Timestamp:
2012/09/10 19:05:38 (12 years ago)
Author:
sunat134
Message:

#1935 パラメータ NOSTOCK_HIDDEN = true を設定すると、MYページお気に入り一覧でエラーになっていたのを修正

File:
1 edited

Legend:

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

    r21867 r22025  
    126126 
    127127        $objQuery->setOrder('create_date DESC'); 
    128         $arrProductId  = $objQuery->getCol('product_id', 'dtb_customer_favorite_products', 'customer_id = ?', array($customer_id)); 
     128        $where = 'customer_id = ?'; 
     129        if (NOSTOCK_HIDDEN) { 
     130            $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))'; 
     131        } 
     132        $arrProductId  = $objQuery->getCol('product_id', 'dtb_customer_favorite_products', $where, array($customer_id)); 
    129133 
    130134        $objQuery       =& SC_Query_Ex::getSingletonInstance(); 
     
    176180            $where = '0<>0'; 
    177181        } 
    178         // 在庫無し商品の非表示 
    179         if (NOSTOCK_HIDDEN) { 
    180             $where .= ' AND (stock_max >= 1 OR stock_unlimited_max = 1)'; 
    181         } 
    182182        return $where; 
    183183    } 
Note: See TracChangeset for help on using the changeset viewer.