Ignore:
Timestamp:
2010/08/06 14:52:59 (16 years ago)
Author:
eccuore
Message:

#792(ダウンロード販売機能) 機能追加

Location:
branches/version-2_5-dev/html
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/html/install/sql/column_comment.sql

    r18764 r18777  
    5656INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_baseinfo','detail_tpl','商品詳細のテンプレートファイル番号'); 
    5757INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_baseinfo','mypage_tpl','MYページのテンプレートファイル番号'); 
     58INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_baseinfo','downloadable_days','ダウンロード可能日数'); 
     59INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_baseinfo','downloadable_days_unlimited','ダウンロード可能日数制限(1:日数制限無し)'); 
    5860INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_deliv','deliv_id','配送業者ID'); 
    5961INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_deliv','name','配送業者名(ヤマト運輸)'); 
  • branches/version-2_5-dev/html/install/sql/create_table_mysql.sql

    r18776 r18777  
    149149    regular_holiday_ids text, 
    150150    latitude text, 
    151     longitude text 
     151    longitude text, 
     152    regular_holiday_ids text, 
     153    downloadable_days numeric DEFAULT 30, 
     154    downloadable_days_unlimited smallint 
    152155) TYPE=InnoDB; 
    153156 
     
    341344    update_date datetime, 
    342345    deliv_date_id int, 
     346    down smallint NOT NULL , 
     347    down_filename text, 
     348    down_realfilename text, 
    343349    PRIMARY KEY (product_id) 
    344350) TYPE=InnoDB; 
     
    12921298    PRIMARY KEY (id(64)) 
    12931299) TYPE=InnoDB; 
     1300 
     1301CREATE TABLE mtb_down ( 
     1302    id int2, 
     1303    name text, 
     1304    rank int2 NOT NULL, 
     1305    PRIMARY KEY (id) 
     1306) TYPE=InnoDB; 
  • branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql

    r18776 r18777  
    149149    regular_holiday_ids text, 
    150150    latitude text, 
    151     longitude text 
     151    longitude text, 
     152    downloadable_days numeric DEFAULT 30, 
     153    downloadable_days_unlimited smallint 
    152154); 
    153155 
     
    341343    update_date timestamp, 
    342344    deliv_date_id int, 
     345    down int2 NOT NULL , 
     346    down_filename text, 
     347    down_realfilename text, 
    343348    PRIMARY KEY (product_id) 
    344349); 
     
    12901295    PRIMARY KEY (id) 
    12911296); 
     1297 
     1298CREATE TABLE mtb_down ( 
     1299    id int2, 
     1300    name text, 
     1301    rank int2 NOT NULL, 
     1302    PRIMARY KEY (id) 
     1303); 
     1304 
  • branches/version-2_5-dev/html/install/sql/create_view.sql

    r18275 r18777  
    117117        dtb_products.update_date, 
    118118        dtb_products.deliv_date_id, 
     119        dtb_products.down, 
     120        dtb_products.down_filename, 
     121        dtb_products.down_realfilename, 
    119122        T4.product_code_min, 
    120123        T4.product_code_max, 
     
    183186              stock_unlimited, 
    184187              product_code 
    185          FROM (dtb_products_class AS T1  
     188         FROM (dtb_products_class AS T1 
    186189    LEFT JOIN dtb_classcategory AS T2 
    187            ON T1.classcategory_id1 = T2.classcategory_id) AS T3  
     190           ON T1.classcategory_id1 = T2.classcategory_id) AS T3 
    188191  LEFT JOIN dtb_classcategory AS T4 
    189          ON T3.classcategory_id2 = T4.classcategory_id) AS T5  
     192         ON T3.classcategory_id2 = T4.classcategory_id) AS T5 
    190193  LEFT JOIN dtb_products AS T6 
    191194         ON product_id_sub = T6.product_id; 
     
    198201            T1.rank, 
    199202            T2.product_count 
    200        FROM dtb_category AS T1  
     203       FROM dtb_category AS T1 
    201204  LEFT JOIN dtb_category_total_count AS T2 
    202205         ON T1.category_id = T2.category_id 
    203206; 
     207 
     208CREATE VIEW vw_download_class as 
     209     SELECT 
     210          p.product_id AS product_id, 
     211          p.down_realfilename AS down_realfilename, 
     212          p.down_filename AS down_filename, 
     213          od.order_id AS order_id, 
     214          o.customer_id AS customer_id, 
     215          o.commit_date AS commit_date, 
     216          o.status AS status 
     217     FROM 
     218          dtb_products p, 
     219          dtb_order_detail od, 
     220          dtb_order o 
     221     WHERE 
     222          p.product_id = od.product_id AND 
     223          od.order_id = o.order_id; 
  • branches/version-2_5-dev/html/install/sql/drop_table.sql

    r17268 r18777  
    9696DROP TABLE dtb_holiday; 
    9797DROP TABLE dtb_customer_favorite_products; 
     98DROP TABLE mtb_down; 
     99 
  • branches/version-2_5-dev/html/install/sql/drop_view.sql

    r17549 r18777  
    66DROP VIEW vw_cross_products_class; 
    77DROP VIEW vw_cross_class; 
     8DROP VIEW vw_download_class; 
  • branches/version-2_5-dev/html/install/sql/insert_data.sql

    r18743 r18777  
    9696INSERT INTO dtb_csv(csv_id,col,disp_name,rank,create_date,update_date) VALUES (1,'(SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 5) AS recommend_comment6','関連商品コメント(6)',57,now(),now()); 
    9797INSERT INTO dtb_csv(csv_id,col,disp_name,rank,create_date,update_date) VALUES (1,'category_id','カテゴリID',58,now(),now()); 
     98INSERT INTO dtb_csv(csv_id,col,disp_name,rank,create_date,update_date) VALUES (1,'down','実商品・ダウンロード',59,now(),now()); 
     99INSERT INTO dtb_csv(csv_id,col,disp_name,rank,create_date,update_date) VALUES (1,'down_filename','ダウンロードファイル名',60,now(),now()); 
     100INSERT INTO dtb_csv(csv_id,col,disp_name,rank,create_date,update_date) VALUES (1,'down_realfilename','ダウンロード商品用ファイルアップロード',61,now(),now()); 
    98101INSERT INTO dtb_csv(csv_id,col,disp_name,rank,create_date,update_date) VALUES (2,'customer_id','顧客ID',1,now(),now()); 
    99102INSERT INTO dtb_csv(csv_id,col,disp_name,rank,create_date,update_date) VALUES (2,'name01','名前1',2,now(),now()); 
     
    307310INSERT INTO dtb_delivtime (deliv_id, time_id, deliv_time) VALUES (1, 2, '午後'); 
    308311 
     312INSERT INTO dtb_payment (payment_method,charge,rule,deliv_id,rank,note,fix,status,del_flg,creator_id,create_date,update_date,payment_image,upper_rule) VALUES ('クレジット', 0, NULL, 1, 5, NULL, 2, 1, 0, 1, now(), now(), NULL, NULL); 
    309313INSERT INTO dtb_payment (payment_method,charge,rule,deliv_id,rank,note,fix,status,del_flg,creator_id,create_date,update_date,payment_image,upper_rule) VALUES ('郵便振替', 0, NULL, 1, 4, NULL, 2, 1, 0, 1, now(), now(), NULL, NULL); 
    310314INSERT INTO dtb_payment (payment_method,charge,rule,deliv_id,rank,note,fix,status,del_flg,creator_id,create_date,update_date,payment_image,upper_rule) VALUES ('現金書留', 0, NULL, 1, 3, NULL, 2, 1, 0, 1, now(), now(), NULL, NULL); 
     
    312316INSERT INTO dtb_payment (payment_method,charge,rule,deliv_id,rank,note,fix,status,del_flg,creator_id,create_date,update_date,payment_image,upper_rule) VALUES ('代金引換', 0, NULL, 1, 1, NULL, 2, 1, 0, 1, now(), now(), NULL, NULL); 
    313317 
    314 INSERT INTO dtb_products (name,deliv_fee,sale_limit,category_id,rank,status,product_flag,point_rate,comment1,comment2,comment3,comment4,comment5,comment6,file1,file2,file3,file4,file5,file6,main_list_comment,main_list_image,main_comment,main_image,main_large_image,sub_title1,sub_comment1,sub_image1,sub_large_image1,sub_title2,sub_comment2,sub_image2,sub_large_image2,sub_title3,sub_comment3,sub_image3,sub_large_image3,sub_title4,sub_comment4,sub_image4,sub_large_image4,sub_title5,sub_comment5,sub_image5,sub_large_image5,sub_title6,sub_comment6,sub_image6,sub_large_image6,del_flg,creator_id,create_date,update_date,deliv_date_id) 
    315 VALUES ('アイスクリーム', NULL, NULL, 5, 1, 1, '10010', 10, NULL, NULL, 'アイス,バニラ,チョコ,抹茶', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '暑い夏にどうぞ。', '08311201_44f65122ee5fe.jpg', '冷たいものはいかがですか?', '08311202_44f6515906a41.jpg', '08311203_44f651959bcb5.jpg', NULL, '<b>おいしいよ<b>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, now(), now(), 2); 
    316 INSERT INTO dtb_products (name,deliv_fee,sale_limit,category_id,rank,status,product_flag,point_rate,comment1,comment2,comment3,comment4,comment5,comment6,file1,file2,file3,file4,file5,file6,main_list_comment,main_list_image,main_comment,main_image,main_large_image,sub_title1,sub_comment1,sub_image1,sub_large_image1,sub_title2,sub_comment2,sub_image2,sub_large_image2,sub_title3,sub_comment3,sub_image3,sub_large_image3,sub_title4,sub_comment4,sub_image4,sub_large_image4,sub_title5,sub_comment5,sub_image5,sub_large_image5,sub_title6,sub_comment6,sub_image6,sub_large_image6,del_flg,creator_id,create_date,update_date,deliv_date_id) 
    317 VALUES ('おなべ', NULL, 5, NULL, 1, 1, '11001', 5, NULL, NULL, '鍋,なべ,ナベ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '一人用からあります。', '08311311_44f661811fec0.jpg', 'たまには鍋でもどうでしょう。', '08311313_44f661dc649fb.jpg', '08311313_44f661e5698a6.jpg', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, now(), now(), 3); 
     318INSERT INTO dtb_products (name,deliv_fee,sale_limit,category_id,rank,status,product_flag,point_rate,comment1,comment2,comment3,comment4,comment5,comment6,file1,file2,file3,file4,file5,file6,main_list_comment,main_list_image,main_comment,main_image,main_large_image,sub_title1,sub_comment1,sub_image1,sub_large_image1,sub_title2,sub_comment2,sub_image2,sub_large_image2,sub_title3,sub_comment3,sub_image3,sub_large_image3,sub_title4,sub_comment4,sub_image4,sub_large_image4,sub_title5,sub_comment5,sub_image5,sub_large_image5,sub_title6,sub_comment6,sub_image6,sub_large_image6,del_flg,creator_id,create_date,update_date,deliv_date_id,down,down_filename,down_realfilename) 
     319VALUES ('アイスクリーム', NULL, NULL, 5, 1, 1, '10010', 10, NULL, NULL, 'アイス,バニラ,チョコ,抹茶', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '暑い夏にどうぞ。', '08311201_44f65122ee5fe.jpg', '冷たいものはいかがですか?', '08311202_44f6515906a41.jpg', '08311203_44f651959bcb5.jpg', NULL, '<b>おいしいよ<b>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, now(), now(), 2, 1, NULL, NULL); 
     320INSERT INTO dtb_products (name,deliv_fee,sale_limit,category_id,rank,status,product_flag,point_rate,comment1,comment2,comment3,comment4,comment5,comment6,file1,file2,file3,file4,file5,file6,main_list_comment,main_list_image,main_comment,main_image,main_large_image,sub_title1,sub_comment1,sub_image1,sub_large_image1,sub_title2,sub_comment2,sub_image2,sub_large_image2,sub_title3,sub_comment3,sub_image3,sub_large_image3,sub_title4,sub_comment4,sub_image4,sub_large_image4,sub_title5,sub_comment5,sub_image5,sub_large_image5,sub_title6,sub_comment6,sub_image6,sub_large_image6,del_flg,creator_id,create_date,update_date,deliv_date_id,down,down_filename,down_realfilename) 
     321VALUES ('おなべ', NULL, 5, NULL, 1, 1, '11001', 5, NULL, NULL, '鍋,なべ,ナベ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '一人用からあります。', '08311311_44f661811fec0.jpg', 'たまには鍋でもどうでしょう。', '08311313_44f661dc649fb.jpg', '08311313_44f661e5698a6.jpg', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, now(), now(), 3, 1, NULL, NULL); 
    318322 
    319323INSERT INTO dtb_products_class (product_id,classcategory_id1,classcategory_id2,product_code,stock,stock_unlimited,sale_limit,price01,price02,status,creator_id,create_date,update_date) 
     
    10911095INSERT INTO mtb_constants VALUES ('PLUGIN_PATH', 'USER_PATH . PLUGIN_DIR', 601, 'プラグイン保存先'); 
    10921096INSERT INTO mtb_constants VALUES ('PLUGIN_URL', 'USER_URL . PLUGIN_DIR', 602, 'プラグイン URL'); 
     1097INSERT INTO mtb_constants VALUES ('DOWNLOAD_DAYS_LEN','3',700,'日数桁数'); 
     1098INSERT INTO mtb_constants VALUES ('DOWNLOAD_CNT_LEN','3',701,'ダウンロード回数桁数'); 
     1099INSERT INTO mtb_constants VALUES ('DOWN_SIZE','50000',702,'ダウンロード販売ファイル用サイズ制限(KB)'); 
     1100INSERT INTO mtb_constants VALUES ('DEFAULT_PRODUCT_DOWN','1',703,'1:実商品 2:ダウンロード'); 
     1101INSERT INTO mtb_constants VALUES ('DOWN_TEMP_DIR','DATA_PATH . "download/temp/"',704,'ダウンロードファイル一時保存'); 
     1102INSERT INTO mtb_constants VALUES ('DOWN_SAVE_DIR','DATA_PATH . "download/save/"',705,'ダウンロードファイル保存先'); 
     1103INSERT INTO mtb_constants VALUES ('DOWNFILE_NOT_FOUND','22',706,'ダウンロードファイル存在エラー'); 
     1104INSERT INTO mtb_constants VALUES ('CREDIT_PAYMENT','1',707,'ダウンロード販売機能用にクレジット決済のpayment_idを指定'); 
     1105 
     1106INSERT INTO mtb_down VALUES ('1','実商品','0'); 
     1107INSERT INTO mtb_down VALUES ('2','ダウンロード','1'); 
    10931108 
    10941109INSERT INTO dtb_module (module_id,module_code,module_name,update_date,create_date) VALUES (0,0,'patch',now(),now()); 
  • branches/version-2_5-dev/html/user_data/packages/default/js/admin.js

    r18701 r18777  
    429429    ); 
    430430}); 
     431//制限数判定 
     432function fnCheckLimit(elem1, elem2, icolor) { 
     433    if(document.form1[elem2]) { 
     434        list = new Array( 
     435                elem1 
     436            ); 
     437        if(document.form1[elem2].checked) { 
     438            fnChangeDisabled(list, icolor); 
     439            document.form1[elem1].value = ""; 
     440        } else { 
     441            fnChangeDisabled(list, ''); 
     442        } 
     443    } 
     444} 
Note: See TracChangeset for help on using the changeset viewer.