Jump to content

Quantites 0.5...

Guest kies76

Recommended Posts


We sell fabrics through our site Using CC5.

I want that the customers could also buy 0.5 metre (50cm), 0.75 or 1.33 whatever length they want. But If they enter 2.5 quantity the system will round it down to 2. If a customer want to order 0.5 the system will roun dit up to 1.

Is there any way to change that?

Also it would be great if the customers could use 2.5 and 2,5 to do an order. We live in Luxembourg and most people in Europe here write 2,5 with a comma.

Any help is much appreciated


Link to comment
Share on other sites

In exploring the code, I've discovered that when clicking Add to Basket from the View Category page, one is able to place in the basket partial units (but must be one or greater), yet, when clicking Add to Basket from the View Product page, only integer values can be placed in the basket. This proves that once we get past the point of getting the product in the basket, partial units will probably stay that way (but one or greater).

So, there is a disparity. (I'll submit a bug report.)

In the meantime, in the file /classes/cart.class.php at around line 170, find just this part at the end of the statement:


Substitute (float) for (int).

Experiment and report your results.

This does not solve the less than one situation, nor the comma/period situation. I can work on that later.

We will also need to add some special handlers for Gift Certificates. I suppose you wouldn't want to sell 2.5 Certificates.

Link to comment
Share on other sites

  • 10 months later...

Join the conversation

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

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