Error when choosing payment method

  • Posts: 95
  • Thank you received: 1
10 years 7 months ago #149417

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

The following user(s) said Thank You: Mohamed Thelji

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 7 months ago #149527

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 :

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;
}
By :
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: 10 years 7 months ago by Mohamed Thelji.
The following user(s) said Thank You: vaclav

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 1
10 years 7 months ago #149536

Perfect!

Now it works.

Thank you Mohamed.

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum