Hi,
Code tricks ? Well, it would require to remove the code:
if(isset($order->order_subtotal) && isset($order->order_shipping_price)) {
if($this->plugin_params->allowshipping == 1) {
$final_price = @$order->order_subtotal + $order->order_shipping_price;
} else {
$final_price = @$order->order_subtotal;
}
} else if(empty($order->cart->full_total->prices[0]->price_value_with_tax)) {
if($this->plugin_params->allowshipping == 1) {
$final_price = @$order->full_total->prices[0]->price_value_with_tax;
}else{
$final_price = @$order->total->prices[0]->price_value_with_tax;
}
if(!empty($order->additional['userpoints']->price_value_with_tax)){
$final_price -= $order->additional['userpoints']->price_value_with_tax;
}
} else {
if($this->plugin_params->allowshipping == 1) {
$final_price = @$order->cart->full_total->prices[0]->price_value_with_tax;
} else {
$final_price = @$order->cart->total->prices[0]->price_value_with_tax;
}
if(!empty($order->cart->additional['userpoints']->price_value_with_tax)){
$final_price -= $order->cart->additional['userpoints']->price_value_with_tax;
}
}
in the file plugins/hikashoppayment/userpoints/userpoints.php and add instead a loop on the products array (in $order->products or $order->cart->products) to see in each product if there is a discount attribute or not and then sum the product price if there is no discount attached to the product.
If you're a developer, it's easy to change.