Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Limiting decimal when showing prices


antagraber

Recommended Posts

Hi,

My store will sell expensive items, so I would like to show decimals for a price when showing the catalog

 

i.e.: 2300,32

 

I know that prices are different if taxes applies or not or even if customer is logged on or not. But I'd like to be able to limit them when shown in the catalog.

And to use them, as usual, when billing.

Any suggestion.

Thanks in ahead of time.

Link to comment
Share on other sites

Are you saying you would have a price such as "2300.32", and want to display it as "2300"? I don't think that would be legal. It would probably be OK to round up to the next whole dollar/euro/whatever currency: "2301". Or, set your prices in the first place to be an even number of currency units ("2300.00") and then format the price to drop the decimal amount. There would be a call on the product display page to format the price (currency), and you would have to make a custom copy of that routine (under a new name) that forces the number of decimal places to display to 0. That way it shouldn't interfere with prices displayed in the shopping cart and checkout. You might have it check the price first, and use the regular formatting if it's under a certain amount.

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...