#211 주문시 추가배송비 처리 코드 추가

This commit is contained in:
chicpro
2013-06-17 15:50:06 +09:00
parent 97d9e2e097
commit 04ec45c0c5
18 changed files with 231 additions and 29 deletions

View File

@ -32,13 +32,13 @@ if (G4_HTTPS_DOMAIN) {
define(_MISU_QUERY_, "
count(distinct a.od_id) as ordercount, /* 주문서건수 */
count(b.ct_id) as itemcount, /* 상품건수 */
(SUM(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) + a.od_send_cost) as orderamount, /* 주문합계 */
(SUM(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) + a.od_send_cost + a.od_send_cost2) as orderamount, /* 주문합계 */
(SUM(b.cp_amount) + a.od_coupon) as couponamount, /* 쿠폰합계*/
(SUM(IF(b.ct_status = '취소' OR b.ct_status = '반품' OR b.ct_status = '품절', (IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)), 0))) as ordercancel, /* 주문취소 */
(a.od_receipt_amount + a.od_receipt_point) as receiptamount, /* 입금합계 */
(a.od_refund_amount + a.od_cancel_card) as receiptcancel, /* 입금취소 */
(
(SUM(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) + a.od_send_cost) -
(SUM(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) + a.od_send_cost + a.od_send_cost2) -
(SUM(IF(b.ct_status = '취소' OR b.ct_status = '반품' OR b.ct_status = '품절', (IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)), 0))) -
a.od_dc_amount -
(a.od_receipt_amount + a.od_receipt_point) +

View File

@ -326,6 +326,14 @@ if(!$result) {
PRIMARY KEY (`sc_id`),
KEY `sc_zip1` (`sc_zip1`),
KEY `sc_zip2` (`sc_zip2`)
)", true);
)", false);
}
// od_send_cost2 추가
$sql = " select od_send_cost2 from {$g4['shop_order_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g4['shop_order_table']}`
ADD `od_send_cost2` INT(11) NOT NULL DEFAULT '0' AFTER `od_send_coupon` ", false);
}
?>