The easiest way is to set the "Quantity Included" to 1.33 and the corresponding units to square meter, and consider each quantity entered by the customer to be a multiple of that. In other words, if they order 2 then they are ordering 2.66 square meters (and with the product setup that way you can display this detail as well, ie "Comes in increments of ${quantityIncluded} ${unitDescription}").
-David
On Apr 14, 2011, at 7:28 AM, Stephane DUCAS wrote:
> Hello all,
>
> My customer sells Flooring and tiling goods by area (square meters). But
> those goods are in a box that are not divideable.
>
> Exemple: a Flooring good is in a box of 1.33 square meter so any Order on
> this good (PO or SO) must be have a quantity divideable by 1.33:
>
> He can order 1.33, 2.66, 3.99 ..... but he can not order 1,2 or any quantity
> not divideable by 1.33.
>
> So if the user type 2 this quantity has to be rounded to 2.66.
>
> My customer doesn't want to sell boxes in his order, prices are based on
> area not boxes and any document like invoices must show the quantity in
> square meter not in boxes.
>
> So I'm looking for a way to have a quantity increment property on the
> product to have this behavior implemented.
>
> I was looking at the "alternative packaging" association but this doesn't
> seems to be the good approach..
>
> Do you have any idea if a such feature is available OOTB on ofbiz or if I
> will have to hack the shoppingcart to have a such behavior?
>
> THX!