Hi Nicolas,
Thanks for the guidelines, it helped finally a lot. It was a long play, as there were several problems. I don't know wether these emerges in fix point discount as well, but I run in a few things.
I write these lines for a memo for myself, but hopefully it helps for someone else as well.
Firstly I modified the file /plugins/hikashoppayment/userpoints/userpoints.php around line 285. the $coupon variable:
if($check !== false && $check > 0) {
if(isset($cart->order_currency_id))
$currency_id = $cart->order_currency_id;
else
$currency_id = hikashop_getCurrency();
$coupon = $check * $this->payment_params->value /100 * $cart->full_total->prices[0]->price_value_without_shipping_with_tax;
if (empty($cart->full_total->prices[0]->price_value_without_shipping_with_tax)){
$coupon = $check * $this->payment_params->value /100 * $cart->full_total->prices[0]->price_value_with_tax;
}
After a few hours I also noticed, that as I use the plugin to let user to use the Point payment as partial payment, it does not able to count the other payment option's price, so finally I decided to write out to users that discount can be used for the product price but not for payment and shipping price.
After that I had to modify the /plugins/hikashop/userpoints/userpoints.php around line 870., because it used to show the price_value_without_payment_with_tax variable's fix percentage always, but it was not the same amount depending on wether the user pushed yes or no on the radio buttons.
if(!empty($consume)) {
if(isset($cart->order_currency_id))
$currency_id = $cart->order_currency_id;
else
$currency_id = hikashop_getCurrency();
$br_fizetes_ara = $cart->full_total->prices[0]->price_value_without_shipping_with_tax * ($consume['points']/20/100);
if (empty($cart->full_total->prices[0]->price_value_without_shipping_with_tax)){
$br_fizetes_ara = $cart->full_total->prices[0]->price_value_with_tax * ($consume['points']/20/100);
}
if ($use_coupon == 1) {
if (empty($cart->full_total->prices[0]->price_value_without_shipping_with_tax)){
$regikedvezmenyertek = $br_fizetes_ara / (1-($consume['points']/20/100));
}
else{
$regikedvezmenyertek = $br_fizetes_ara;
}
$discount = $currencyClass->format($regikedvezmenyertek, $currency_id);
}
else {
$discount = $currencyClass->format($br_fizetes_ara, $currency_id);}
}