Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Incorrect price shown on shopping_cart.php & checkout_shipping.php


chrish123

Recommended Posts

Posted

Hi,

 

I had a customer notice that there is a fault in the code, even though the actual price is correct what they actually get charged, and subtotal and total are displayed correct, the incorrect price is shown under "products" when more than one product is ordered.

 

You can see this in the image below of shopping_cart.php & checkout_confirmation.php

 

shoppingcart.gif<br><br>

 

checkoutconfirmation.gif

 

Anyone else had this issue? My store is heavily modified, and the incorrect price only occurs in the checkout procedure..

 

Kind regards

Chris

Posted

Well I found out on checkout_confirmation.php, it seems to be due to a call to "display_price2" in "includes/classes/currencies.php".

 

I seem to have fixed it by editing catalog/checkout_confirmation.php from:

 

echo '			<td class="main" align="middle" valign="top">' . $currencies->display_price2($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .

 

To look like:

echo '			<td class="main" align="middle" valign="top">£' . $currencies->calculate_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . ' Inc VAT</td>' . "\n" .

 

And catalog/shopping_cart.php from:

 

	  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => ' class="total vam"',
									   'text' => '<span class="productSpecialPrice">' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</span>');

 

	  
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => ' class="total vam"',											
'text' => '<span class="productSpecialPrice">£' . $currencies->calculate_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ' Inc VAT</span>');

 

If anyone knows why the call to display_price2 was creating this issue please tell! ;)

 

Thanks Chris

Posted

display_price2 would have been part of a contribution.

Suggests that the contribution is (partially) incorrectly coded.

Posted

I am looking at it and it is the price without VAT that is incorrect. One page is 157.08 and on the other 157.10.

Posted
display_price2 would have been part of a contribution.

Suggests that the contribution is (partially) incorrectly coded.

 

Hi, the function seems to be used in quite a few contributions, it is simply a duplicate of the function display_price... so it could be some other issue.

Posted
I am looking at it and it is the price without VAT that is incorrect. One page is 157.08 and on the other 157.10.

 

Hiya, your right, on the shopping_cart image, I was missing 2p from both inc vat price and ex vat price, but i have managed to fix it with the quickfix above thank god! :rolleyes:

Archived

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

×
×
  • Create New...