Re: [解決済み] 割引設定するとポイントがつかない

フォーラム バグ報告 [解決済み] 割引設定するとポイントがつかない Re: [解決済み] 割引設定するとポイントがつかない

#62359
lb_chibi
参加者

nanbuさん

お疲れ様です。

本件、この部分でひっかかり、私なりに修正しました。

オフィシャルでもご確認いただき、アップデートいただけたら幸いです。

usceshop.class.php 5310行目付近

function get_order_point( $mem_id = '', $display_mode = '', $cart = array() ) {
if( $mem_id == '' || $this->options['membersystem_state'] == 'deactivate' || $this->options['membersystem_point'] == 'deactivate') return 0;

if ( empty($cart) )
$cart = $this->cart->get_cart();

if ( empty($display_mode) )
$display_mode = $this->options['display_mode'];

$point = 0;
$total = $this->get_total_price( $cart );
if ( $display_mode == 'Promotionsale' ) {
if ( $this->options['campaign_privilege'] == 'discount' ) {
foreach ( $cart as $rows ) {
$cats = $this->get_post_term_ids($rows['post_id'], 'category');
if ( !in_array($this->options['campaign_category'], $cats) ){
$rate = get_post_custom_values('_itemPointrate', $rows['post_id']);
$price = $rows['price'] * $rows['quantity'];
$point += $price * $rate[0] / 100;
}
}
} elseif ( $this->options['campaign_privilege'] == 'point' ) {
foreach ( $cart as $rows ) {
$rate = get_post_custom_values('_itemPointrate', $rows['post_id']);
//$price = $this->getItemPrice($rows['post_id'], $rows['sku']) * $rows['quantity'];
$price = $rows['price'] * $rows['quantity'];
$cats = $this->get_post_term_ids($rows['post_id'], 'category');
if ( in_array($this->options['campaign_category'], $cats) )
$point += $price * $rate[0] / 100 * $this->options['privilege_point'];
else
$point += $price * $rate[0] / 100;
}
}
} else {
foreach ( $cart as $rows ) {
$rate = get_post_custom_values('_itemPointrate', $rows['post_id']);
//$price = $this->getItemPrice($rows['post_id'], $rows['sku']) * $rows['quantity'];
$price = $rows['price'] * $rows['quantity'];
$point += $price * $rate[0] / 100;
}
}

return ceil($point);
}

お忙しいところ恐縮ではございますが、何卒よろしくお願いします。