- Posts: 95
- Thank you received: 1
Error when choosing payment method
12 years 6 months ago #149417
by vaclav
Error when choosing payment method was created by vaclav
Hello,
I have this problem with payment methods:
For order total price 1 - 499 I have payment fee 38
For order total price 500 + I have payment fee 19
The problem is when my customer orders goods in total value for example 473. The customer can choose the payment with fee 38. But when he chooses the payment the total of the order changes to 501 and then HikaShop changes availiable payment to that with fee 19 (because now the order total is more than 500) and is unable to check out with that 38 fee payment. When he chooses the 19 fee payment, the total of the order changes to 492 and now he can check out only choosing payment with fee 38. And it goes round and round...
So he is unable to check out in this case.
How can I solve this? Is there any function which uses only the goods value for choosing the payment fee? It does not make sense when the payment type is choosen depending on goods + payment fee value..
Thanks
Vaclav
I have this problem with payment methods:
For order total price 1 - 499 I have payment fee 38
For order total price 500 + I have payment fee 19
The problem is when my customer orders goods in total value for example 473. The customer can choose the payment with fee 38. But when he chooses the payment the total of the order changes to 501 and then HikaShop changes availiable payment to that with fee 19 (because now the order total is more than 500) and is unable to check out with that 38 fee payment. When he chooses the 19 fee payment, the total of the order changes to 492 and now he can check out only choosing payment with fee 38. And it goes round and round...
So he is unable to check out in this case.
How can I solve this? Is there any function which uses only the goods value for choosing the payment fee? It does not make sense when the payment type is choosen depending on goods + payment fee value..
Thanks
Vaclav
The following user(s) said Thank You: Mohamed Thelji
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 6 months ago - 12 years 6 months ago #149527
by Mohamed Thelji
Replied by Mohamed Thelji on topic Error when choosing payment method
Hello Vaclav,
Thanks for your feedback, I just made a fix regarding that issue, so can you edit your file "administrator\components\com_hikashop\helpers\helper.php" and change these lines :
By :
Thanks for your feedback, I just made a fix regarding that issue, so can you edit your file "administrator\components\com_hikashop\helpers\helper.php" and change these lines :
Code:
if(@$method->payment_params->payment_price_use_tax) {
if(isset($order->order_full_price))
$price = $order->order_full_price;
if(isset($order->total->prices[0]->price_value_with_tax))
$price = $order->total->prices[0]->price_value_with_tax;
if(isset($order->full_total->prices[0]->price_value_with_tax))
$price = $order->full_total->prices[0]->price_value_with_tax;
} else {
if(isset($order->order_full_price))
$price = $order->order_full_price;
if(isset($order->total->prices[0]->price_value))
$price = $order->total->prices[0]->price_value;
if(isset($order->full_total->prices[0]->price_value))
$price = $order->full_total->prices[0]->price_value;
}
Code:
if(@$method->payment_params->payment_price_use_tax) {
if(isset($order->order_full_price))
$price = $order->order_full_price;
if(isset($order->total->prices[0]->price_value_with_tax))
$price = $order->total->prices[0]->price_value_with_tax;
if(isset($order->full_total->prices[0]->price_value_with_tax))
$price = $order->full_total->prices[0]->price_value_with_tax;
if(isset($order->full_total->prices[0]->price_value_without_payment_with_tax))
$price = $order->full_total->prices[0]->price_value_without_payment_with_tax;
} else {
if(isset($order->order_full_price))
$price = $order->order_full_price;
if(isset($order->total->prices[0]->price_value))
$price = $order->total->prices[0]->price_value;
if(isset($order->full_total->prices[0]->price_value))
$price = $order->full_total->prices[0]->price_value;
if(isset($order->full_total->prices[0]->price_value_without_payment))
$price = $order->full_total->prices[0]->price_value_without_payment;
}
Last edit: 12 years 6 months ago by Mohamed Thelji.
The following user(s) said Thank You: vaclav
Please Log in or Create an account to join the conversation.
12 years 6 months ago #149536
by vaclav
Replied by vaclav on topic Error when choosing payment method
Perfect!
Now it works.
Thank you Mohamed.
Now it works.
Thank you Mohamed.
Please Log in or Create an account to join the conversation.
Time to create page: 0.185 seconds