Just want to ask where to edit the calculation of pending points. Because aside from shipping and tax, i have other charges like shipping insurance, low order fee, etc. I dont want to include the cost of these other charges when computing for pending points. I already changed my code in /includes/functions/redemptions.php to this:
// products pending points to add.
function get_points_toadd($order) {
if ($order->info['total'] > 0) {
if ((USE_POINTS_FOR_SHIPPING == 'false') && (USE_POINTS_FOR_TAX == 'false'))
$points_toadd = $order->info['total'] - $order->info['shipping_cost'] - $order->info['tax'] - $order->info['paypal_fee'] - $order->info['insurance'];
else if ((USE_POINTS_FOR_SHIPPING == 'false') && (USE_POINTS_FOR_TAX == 'true'))
$points_toadd = $order->info['total'] - $order->info['shipping_cost'] - $order->info['paypal_fee'] - $order->info['insurance'];
else if ((USE_POINTS_FOR_SHIPPING == 'true') && (USE_POINTS_FOR_TAX == 'false'))
$points_toadd = $order->info['total'] - $order->info['tax'] - $order->info['paypal_fee'] - $order->info['insurance'];
else $points_toadd = $order->info['total'] - $order->info['paypal_fee'] - $order->info['insurance'];
if (USE_POINTS_FOR_SPECIALS == 'false') {
for ($i=0; $i<sizeof($order->products); $i++) {
if (tep_get_products_special_price($order->products[$i]['id']) >0) {
if (USE_POINTS_FOR_TAX == 'true') {
$points_toadd = $points_toadd - (tep_add_tax($order->products[$i]['final_price'],$order->products[$i]['tax'])*$order->products[$i]['qty']);
} else {
$points_toadd = $points_toadd - ($order->products[$i]['final_price']*$order->products[$i]['qty']);
}
}
}
}
return $points_toadd;
} else {
return false;
}
}
but when a customer confirms his order, the other charges are still being included in the computation of pending points.
For example
Sub total $100
Shipping $10
Insurance $9
Total $119
Pending points should be 100 (shipping and tax are excluded in my admin) but when i go to the admin section under pending points, the points calculated is 109.
thanks