Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error: Sub-Total is always double the real price


supernoc

Recommended Posts

:'( Greetings,

 

Problem:

- Order sub-total is always DOUBLE the real value of the cart contents.

 

Facts:

- Qty is correct

- Shipping price and qty is correct

 

I have removed recently added contributions of PWA and KGT Discount coupons. Obviously this is something I changed and fubar'd as this worked previously. I have spent the last 8 hours comparing file after file to backup files. I am still at a loss.

 

I am humbling seeking advice on how to debug the sub-total process, or any tips you may offer. If more information is required, do not hesitate to contact me.

 

I will continue to search the forums for subtotal calculations, as I have for the last hour..

 

Thank you in advance.

Link to comment
Share on other sites

Here is the solution:

 

For some reason in /includes/classes/order.php there was duplicate lines of the below

		$shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
	$this->info['subtotal'] += $shown_price;

Link to comment
Share on other sites

  • 1 year later...
Here is the solution:

 

For some reason in /includes/classes/order.php there was duplicate lines of the below

		$shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
	$this->info['subtotal'] += $shown_price;

 

Hello, I have exactly the same problem, but I can't see that I have duplicate lines!! My line look like this:

 

 

$shown_price = $currencies->calculate_price($this->products[$index]['final_price'], $this->products[$index]['tax'], $this->products[$index]['qty']);

$this->info['subtotal'] += $shown_price;

 

So, please... where do I have this problem?

 

I do need help... please.

 

Sara

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...