Checkout -> Final total less than 0,00 €

  • Posts: 2
  • Thank you received: 0
13 years 10 months ago #8694

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!

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 10 months ago #8695

Hi,

What you can do is edit the file administrator/components/com_hikashop/classes/cart.php and add after the 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:
			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.

  • Posts: 2
  • Thank you received: 0
13 years 10 months ago #8696

Hi Nicolas,

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.054 seconds
Powered by Kunena Forum