バージョン選択

フォーラム

メニュー

オンライン状況

83 人のユーザが現在オンラインです。 (70 人のユーザが フォーラム を参照しています。)
登録ユーザ: 1
ゲスト: 82
Go88app もっと...

サイト内検索

質問 > 管理機能 > 期間別売上集計の項目変更

管理機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
su-sann
投稿日時: 2017/10/18 13:02
対応状況: −−−
新米
登録日: 2016/12/7
居住地:
投稿: 10
期間別売上集計の項目変更
EC-CUBEバージョン:2.13.5
PHPバージョン:PHP 5.6.30
DBバージョン:MySQL 5.6.35
--------------------------------

売上集計>期間別集計の集計項目を変更したいのですが、どのように対応をすればいいかご教示頂けませんでしょうか。

項目としては、「小計(商品売上)」「送料」「手数料」「値引き」「使用ポイント」を想定しています。
何かいい方法はないでしょうか。
yuh
投稿日時: 2017/10/18 13:43
対応状況: −−−
登録日: 2013/1/9
居住地: 大阪
投稿: 1819
Re: 期間別売上集計の項目変更
SC_DB_DBFactory_MYSQLのgetOrderTotalDaysWhereSqlを変更してください


----------------


http://ec-lab.net/

su-sann
投稿日時: 2017/10/30 19:09
対応状況: −−−
新米
登録日: 2016/12/7
居住地:
投稿: 10
Re: 期間別売上集計の項目変更
ご教示頂きありがとうございます。

下記を変更しているのですが、うまく集計ができません。
ーーーーーーーーーーーーーーーーーーーーーーーーー
return " date_format(create_date, '".$format."') AS str_date,
COUNT(order_id) AS total_order,
SUM(CASE WHEN order_sex = 1 THEN 1 ELSE 0 END) AS men,
SUM(CASE WHEN order_sex = 2 THEN 1 ELSE 0 END) AS women,
SUM(CASE WHEN customer_id <> 0 AND order_sex = 1 THEN 1 ELSE 0 END) AS men_member,
SUM(CASE WHEN customer_id <> 0 AND order_sex = 2 THEN 1 ELSE 0 END) AS women_member,
SUM(CASE WHEN customer_id = 0 AND order_sex = 1 THEN 1 ELSE 0 END) AS men_nonmember,
SUM(CASE WHEN customer_id = 0 AND order_sex = 2 THEN 1 ELSE 0 END) AS women_nonmember,
SUM(total) AS total,
AVG(total) AS total_average";
}
ーーーーーーーーーーーーーーーーーーーーーーーーー

大変申し訳ないのですが、
COUNT(order_id)やSUM(total) の( )内の変数は、
どこを参照すればいいか、ご教示頂けますでしょうか。

宜しくお願い致します。
yuh
投稿日時: 2017/10/31 1:24
対応状況: −−−
登録日: 2013/1/9
居住地: 大阪
投稿: 1819
Re: 期間別売上集計の項目変更
subtotal
deliv_fee
charge
discount
use_point
です。


----------------


http://ec-lab.net/

su-sann
投稿日時: 2017/10/31 10:36
対応状況: −−−
新米
登録日: 2016/12/7
居住地:
投稿: 10
Re: 期間別売上集計の項目変更
ご親切にありがとうございます。

項目を購入件数、商品売上、送料、手数料、ポイント、クーポン、購入合計、購入平均に変更し下記の様に変更を致しました。

■SC_DB_DBFactory_MYSQL.php
----------------------------------------------
return " date_format(create_date, '".$format."') AS str_date,
COUNT(order_id) AS total_order,
SUM(subtotal) AS total_subtotal,
SUM(deliv_fee) AS total_deliv,
SUM(charge) AS total_charge,
SUM(use_point) AS total_point,
SUM(coupon_discount) AS total_coupon,
SUM(total) AS total,
AVG(total) AS total_average";
}
----------------------------------------------


■page_term.tpl
----------------------------------------------
<td class="right"><!--{*購入件数*}--><!--{$arrResults[cnt].total_order|n2s}-->件</td>
<td class="right"><!--{*商品売上*}--><!--{$arrResults[cnt].total_subtotal|n2s}--></td>
<td class="right"><!--{*送料*}--><!--{$arrResults[cnt].total_deliv|n2s}--></td>
<td class="right"><!--{*手数料*}--><!--{$arrResults[cnt].total_charge|n2s}--></td>
<td class="right"><!--{*ポイント*}--><!--{$arrResults[cnt].total_point|n2s}--></td>
<td class="right"><!--{*クーポン*}--><!--{$arrResults[cnt].total_coupon|n2s}--></td>
<td class="right"><!--{*購入合計*}--><!--{$arrResults[cnt].total|n2s}-->円</td>
<td class="right"><!--{*購入平均*}--><!--{$arrResults[cnt].total_average|n2s}-->円</td>
----------------------------------------------


集計がうまくいかず、他に修正する箇所はありますでしょうか。
ご教示頂けますと幸いです。
su-sann
投稿日時: 2017/11/28 10:54
対応状況: −−−
新米
登録日: 2016/12/7
居住地:
投稿: 10
Re: 期間別売上集計の項目変更
売上集計>期間別集計の集計項目を変更したく、下記を修正致しました。
フォームの反映は出来たのですが、集計がうまく反映されません。

■SC_DB_DBFactory_MYSQL.php
----------------------------------------------
return " date_format(create_date, '".$format."') AS str_date,
COUNT(order_id) AS total_order,
SUM(subtotal) AS total_subtotal,
SUM(deliv_fee) AS total_deliv,
SUM(charge) AS total_charge,
SUM(use_point) AS total_point,
SUM(coupon_discount) AS total_coupon,
SUM(total) AS total,
AVG(total) AS total_average";
}
----------------------------------------------


■page_term.tpl
----------------------------------------------
<td class="right"><!--{*購入件数*}--><!--{$arrResults[cnt].total_order|n2s}-->件</td>
<td class="right"><!--{*商品売上*}--><!--{$arrResults[cnt].total_subtotal|n2s}--></td>
<td class="right"><!--{*送料*}--><!--{$arrResults[cnt].total_deliv|n2s}--></td>
<td class="right"><!--{*手数料*}--><!--{$arrResults[cnt].total_charge|n2s}--></td>
<td class="right"><!--{*ポイント*}--><!--{$arrResults[cnt].total_point|n2s}--></td>
<td class="right"><!--{*クーポン*}--><!--{$arrResults[cnt].total_coupon|n2s}--></td>
<td class="right"><!--{*購入合計*}--><!--{$arrResults[cnt].total|n2s}-->円</td>
<td class="right"><!--{*購入平均*}--><!--{$arrResults[cnt].total_average|n2s}-->円</td>
----------------------------------------------

他に変更するファイルなどはありますでしょうか。
どなたかご教示頂けますと幸いです。
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,849名です
総投稿数は109,986件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1291
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.