Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Decimals and Fractions


Recommended Posts

Hi All,


I am wondering if anyone knows if osCommerce can support fractions and decimals in the product configuration. So, we may want customers to be able to buy 1 3/8 yard of fabric or 1.5 yard of fabric.


I just need to know if osCommerce has the option of the customer selecting the product (say a pattern for a carpet) and then entering the amount of this they want, while the software calculates the final cost based on this.


Is this possible?


Many Thanks

Link to comment
Share on other sites

I don't think I've ever seen anything to support fractional input, but it could be done. You'd have to write code to grab the "quantity" input field just before the convert-to-number routine gets it, and examine it for various fractional formats and convert them to decimal numbers. Don't forget the many different ways that people can choose to enter fractions and mixed numbers: 1 1/2, 1-1/2, 11/2, 1.1/2, 1½, etc.


The other part of your question involves purchases of non-discrete counts (1.5 yards instead of 2 items). I'm pretty sure I've seen that discussed before -- maybe something to do with attributes? Look around in the add-ons if you haven't already. Maybe someone who's implemented such a thing can say what they did.

Link to comment
Share on other sites


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

  • Create New...