Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sub-Total Rounding off prices


smailliwnosaj

Recommended Posts

I installed Option Types V2 on my OsCommerce 2.2 so that I could upload images and text for each item in my cart.

After that, I was getting an error that the function calculate_price() was not defined, so I went to

catalog --> includes --> classes --> currencies.php and added in the following:

 

function calculate_price($products_price, $products_tax, $quantity = 1)

{

global $currency;

return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;

}

 

which I pulled from the forum topic here:

http://www.oscommerce.com/forums/index.php?sho...calculate_price

 

NOW:

The Sub-Total , which is generated from the script:

 

currencies-->format($cart-->show_total())

 

in my catalog--> shopping_cart.php file, is rounding off prices to 0 decimal places.

 

Please, if anyone has any ideas about how to fix this, I would be greatly appreciative.

 

Thank you,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...