Allow Decimal Quantities in Cart (e.g., 1.2 sqm) – How to Achieve This?
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 38
- Joined: 10 Oct 2024, 12:51
Allow Decimal Quantities in Cart (e.g., 1.2 sqm) – How to Achieve This?
Hi everyone,
I need to allow users to add decimal quantities of a product to the cart in Aimeos, for example, 1.2 square meters instead of just whole numbers.
I was able to set the minimum quantity to 0.1, but when adding the product to the cart, Aimeos automatically rounds the quantity up or down to a whole number.
Where do I need to adjust settings or code to allow precise decimal quantities in the cart and throughout the checkout process?
Is there a way to achieve this without custom modifications?
Thanks in advance for any help!
I need to allow users to add decimal quantities of a product to the cart in Aimeos, for example, 1.2 square meters instead of just whole numbers.
I was able to set the minimum quantity to 0.1, but when adding the product to the cart, Aimeos automatically rounds the quantity up or down to a whole number.
Where do I need to adjust settings or code to allow precise decimal quantities in the cart and throughout the checkout process?
Is there a way to achieve this without custom modifications?
Thanks in advance for any help!
Re: Allow Decimal Quantities in Cart (e.g., 1.2 sqm) – How to Achieve This?
Aimeos can already handle fractional quantities if you set the "Scale" value in your products to the minimum allowed fraction. This works for Aimeos 2023.10+
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
