Re: [未解決] 送料個別課金の計算不具合

フォーラム バグ報告 [未解決] 送料個別課金の計算不具合 Re: [未解決] 送料個別課金の計算不具合

#60214
nanbu
キーマスター

ご報告ありがとうございます。

症状を確認しました。

配送設定で送料固定を設定していた場合におきる不具合でした。

v0.7 で修正を反映させたいと思います。

お急ぎでしたら、usc-e-shop/classesusceshop.class.php の関数 function getShippingCharge( $pref, $cart = array(), $entry = array() ) { 内の下記のコメントアウトしてある部分を削除してみてください。

function getShippingCharge( $pref, $cart = array(), $entry = array() ) {
if( empty($cart) )
$cart = $this->cart->get_cart();
if( empty($entry) )
$entry = $this->cart->get_entry();

$d_method_id = $entry['order']['delivery_method'];
$d_method_index = $this->get_delivery_method_index($d_method_id);

$fixed_charge_id = $this->options['delivery_method'][$d_method_index]['charge'];

$individual_quant = 0;
$total_quant = 0;
$charges = array();

foreach ( $cart as $rows ) {
$s_charge_id = $this->getItemShippingCharge($rows['post_id']);
$s_charge_index = $this->get_shipping_charge_index($s_charge_id);
$charge = $this->options['shipping_charge'][$s_charge_index]['value'][$pref];
if($this->getItemIndividualSCharge($rows['post_id'])){
$individual_quant += $rows['quantity'];
$individual_charge += $rows['quantity'] * $charge;
}else{
$charges[] = $charge;
}
$total_quant += $rows['quantity'];
}

// if( $fixed_charge_id >= 0 ){
// $fix_charge_index = $this->get_shipping_charge_index($fixed_charge_id);
// $fix_charge = $this->options['shipping_charge'][$fix_charge_index]['value'][$pref];
// if( $total_quant > $individual_quant ){
// $charge = $fix_charge + $fix_charge * $individual_quant;
// }else{
// $charge = $fix_charge * $individual_quant;
// }
//
// }else{
if( count($charges) > 0 ){
rsort($charges);
$max_charge = $charges[0];
$charge = $max_charge + $individual_charge;
}else{
$charge = $individual_charge;
}

// }

return $charge;

}