Ignore:
Timestamp:
2010/09/27 11:49:29 (14 years ago)
Author:
eccuore
Message:

#792(ダウンロード販売機能) vw_download_class削除、product_class_id対応(規格構成変更と並行作業中なので、作業途中の部分有)

File:
1 edited

Legend:

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

    r18820 r18824  
    5858        $order_id = $_GET['order_id']; 
    5959        $product_id = $_GET['product_id']; 
    60         $classcategory_id1 = $_GET['classcategory_id1']; 
    61         $classcategory_id2 = $_GET['classcategory_id2']; 
     60        $product_class_id = $_GET['product_class_id']; 
    6261 
    6362        // ID の数値チェック 
     
    6665            || !is_numeric($order_id) 
    6766            || !is_numeric($product_id) 
    68             || !is_numeric($classcategory_id1) 
    69             || !is_numeric($classcategory_id2)) { 
     67            || !is_numeric($product_class_id)) { 
    7068            SC_Utils_Ex::sfDispSiteError(""); 
    7169        } 
     
    7977            //DBから商品情報の読込 
    8078 
    81             $arrForm = $this->lfGetRealFileName($customer_id, $order_id, $product_id, $classcategory_id1, $classcategory_id2); 
     79            $arrForm = $this->lfGetRealFileName($customer_id, $order_id, $product_id, $product_class_id); 
    8280 
    8381            //ステータスが支払済み以上である事 
     
    125123     * @param integer $order_id 受注ID 
    126124     * @param integer $product_id 商品ID 
     125     * @param integer $product_class_id 商品規格ID 
    127126     * @return array 商品情報の配列 
    128127     */ 
    129     function lfGetRealFileName($customer_id, $order_id, $product_id, $classcategory_id1, $classcategory_id2) { 
     128    function lfGetRealFileName($customer_id, $order_id, $product_id, $product_class_id) { 
    130129        $objQuery = new SC_Query(); 
    131         $col = "*"; 
    132         $table = "vw_download_class AS T1"; 
     130        $col = <<< __EOS__ 
     131            pc.product_id AS product_id, 
     132            pc.product_class_id AS product_class_id, 
     133            pc.down_realfilename AS down_realfilename, 
     134            pc.down_filename AS down_filename, 
     135            o.order_id AS order_id, 
     136            o.customer_id AS customer_id, 
     137            o.payment_date AS payment_date, 
     138            o.status AS status 
     139__EOS__; 
     140 
     141        $table = <<< __EOS__ 
     142            dtb_products_class pc, 
     143            dtb_order_detail od, 
     144            dtb_order o 
     145__EOS__; 
     146 
    133147        $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 
    134         $where = "T1.customer_id = ? AND T1.order_id = ? AND T1.product_id = ? AND T1.classcategory_id1 = ? AND T1.classcategory_id2 = ?"; 
    135         $where .= " AND " . $dbFactory->getDownloadableDaysWhereSql("T1"); 
     148        $where = "o.customer_id = ? AND o.order_id = ? AND pc.product_id = ? AND pc.product_class_id = ?"; 
     149        $where .= " AND " . $dbFactory->getDownloadableDaysWhereSql(); 
    136150        $where .= " = 1"; 
    137151        $arrRet = $objQuery->select($col, $table, $where, 
    138                                     array($customer_id, $order_id, $product_id, $classcategory_id1, $classcategory_id2)); 
     152                                    array($customer_id, $order_id, $product_id, $product_class_id)); 
    139153        return $arrRet[0]; 
    140154    } 
Note: See TracChangeset for help on using the changeset viewer.