Zen-Cart v1.3.0.2で
一般設定>クーポン券の設定>差引残高0の場合の注文ステータス
が反映されないというバグを発見しましたので、ご報告いたします。

修正方法は
includes\classes\order.php
550行目付近
[code]
if ($this->info[‘total’] == 0) {
if (DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID == 0) {
$this->info[‘order_status’] = DEFAULT_ORDERS_STATUS_ID;
} else {
$this->info[‘order_status’] = DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID;
}
}
[/code]

[code]
/*
// moved to function create
if ($this->info[‘total’] == 0) {
if (DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID == 0) {
$this->info[‘order_status’] = DEFAULT_ORDERS_STATUS_ID;
} else {
$this->info[‘order_status’] = DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID;
}
}
*/
[/code]
のようにコメントアウトし、そのあとのfunction createの頭
[code]
function create($zf_ot_modules, $zf_mode = 2) {
global $db;
[/code]
に以下を追加すればOKです。
[code]
function create($zf_ot_modules, $zf_mode = 2) {
global $db;

if ($this->info[‘total’] == 0) {
if (DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID == 0) {
$this->info[‘order_status’] = DEFAULT_ORDERS_STATUS_ID;
} else {
if ($_SESSION[‘payment’] != ‘freecharger’) {
$this->info[‘order_status’] = DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID;
}
}
}
[/code]