- Posts: 2
- Thank you received: 0
Checkout -> Final total less than 0,00 €
15 years 7 months ago #8694
by kaykaykay
Checkout -> Final total less than 0,00 € was created by kaykaykay
Hi Nicolas,
first of all thanks a lot for your help you gave Gabor and me within the recent months.
on our web site www.nail-designer.com we have a problem with total amounts less than 0.00€.
If a customer uses a coupon with an amount bigger than the amount of the product including shipping and tax the final total is less than 0, e.g. -1,20€.
Is there a possibility to change it to 0.00€?
Till now we just use the check and the paypal plugin as payment methods. If a user choosed paypal and has an amount less than 0, Hikashop still leads the user to paypal. And more worse, the coupon is not showing up on the paypal calculation, so the user has to pay the total without a reduction.
We haven't updated Hikashop yet, so we still use version 1.4.4!
Thank you!
first of all thanks a lot for your help you gave Gabor and me within the recent months.
on our web site www.nail-designer.com we have a problem with total amounts less than 0.00€.
If a customer uses a coupon with an amount bigger than the amount of the product including shipping and tax the final total is less than 0, e.g. -1,20€.
Is there a possibility to change it to 0.00€?
Till now we just use the check and the paypal plugin as payment methods. If a user choosed paypal and has an amount less than 0, Hikashop still leads the user to paypal. And more worse, the coupon is not showing up on the paypal calculation, so the user has to pay the total without a reduction.
We haven't updated Hikashop yet, so we still use version 1.4.4!
Thank you!
Please Log in or Create an account to join the conversation.
15 years 7 months ago #8695
by nicolas
Replied by nicolas on topic Re: Checkout -> Final total less than 0,00 €
Hi,
What you can do is edit the file administrator/components/com_hikashop/classes/cart.php and add after the code:
the code:
Let us know if that works and we will included it in next version of HikaShop.
What you can do is edit the file administrator/components/com_hikashop/classes/cart.php and add after the code:
Code:
if(!empty($shipping_id)){
$cart->shipping = $app->getUserState( HIKASHOP_COMPONENT.'.shipping_data');
if(!empty($cart->shipping)){
$currencyClass = hikashop::get('class.currency');
$shipping =& $cart->shipping;
$shippings = array(&$shipping);
$currencyClass->processShippings($shippings);
//calculate total price with shipping
$currencyClass->addShipping($cart->shipping,$cart->full_total);
$cart->full_total=&$cart->shipping->total;
}
}
the code:
Code:
if(bccomp($cart->full_total->prices[0]->price_value_with_tax,0,5)<=0){
$cart->full_total->prices[0]->price_value_with_tax = 0;
$cart->full_total->prices[0]->price_value = 0;
}
Let us know if that works and we will included it in next version of HikaShop.
Please Log in or Create an account to join the conversation.
15 years 7 months ago #8696
by kaykaykay
Replied by kaykaykay on topic Re: Checkout -> Final total less than 0,00 €
Hi Nicolas,
once again thank you for your quick response!
Works fine and it seems to solve all mentioned problems!
once again thank you for your quick response!
Works fine and it seems to solve all mentioned problems!
Please Log in or Create an account to join the conversation.
Time to create page: 0.155 seconds