Changeset 16615


Ignore:
Timestamp:
2007/10/30 17:30:45 (14 years ago)
Author:
nanasess
Message:

非公開商品表示修正(#153)

Location:
branches/feature-module-update/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/helper/SC_Helper_DB.php

    r16598 r16615  
    715715     * 
    716716     */ 
    717     function sfGetCategoryId($product_id, $category_id = 0) { 
     717    function sfGetCategoryId($product_id, $category_id = 0, $closed = false) { 
     718        if ($closed) { 
     719            $status = ""; 
     720        } else { 
     721            $status = "status = 1"; 
     722        } 
    718723 
    719724        if(!$this->g_category_on) { 
     
    723728            if(SC_Utils_Ex::sfIsInt($category_id) && $this->sfIsRecord("dtb_category","category_id", $category_id)) { 
    724729                $this->g_category_id = array($category_id); 
    725             } else if (SC_Utils_Ex::sfIsInt($product_id) && $this->sfIsRecord("dtb_products","product_id", $product_id, "status = 1")) { 
     730            } else if (SC_Utils_Ex::sfIsInt($product_id) && $this->sfIsRecord("dtb_products","product_id", $product_id, $status)) { 
    726731                $objQuery = new SC_Query(); 
    727732                $where = "product_id = ?"; 
  • branches/feature-module-update/data/class/pages/products/LC_Page_Products_Detail.php

    r16582 r16615  
    9898        // 管理ページからの確認の場合は、非公開の商品も表示する。 
    9999        if(isset($_GET['admin']) && $_GET['admin'] == 'on') { 
     100            SC_Utils_Ex::sfIsSuccess(new SC_Session()); 
     101            $status = true; 
    100102            $where = "del_flg = 0"; 
    101103        } else { 
     104            $status = false; 
    102105            $where = "del_flg = 0 AND status = 1"; 
    103106        } 
     
    202205          $this->tpl_sale_limit = $this->arrProduct['sale_limit']; 
    203206        } 
    204  
    205207        // サブタイトルを取得 
    206         $arrCategory_id = $objDb->sfGetCategoryId($arrRet[0]['product_id']); 
     208        $arrCategory_id = $objDb->sfGetCategoryId($arrRet[0]['product_id'], $status); 
    207209        $arrFirstCat = $objDb->sfGetFirstCat($arrCategory_id[0]); 
    208210        $this->tpl_subtitle = $arrFirstCat['name']; 
Note: See TracChangeset for help on using the changeset viewer.