We're setting up a store for floor coverings (carpets etc.) where there prices should be displayed for 1 m².
`However, for some products the user should be able to enter the room's width and length and buy the required amount of carpet, e.g. 3.5 m² x 4.5 m² = 15.75 m². Other products are sold by meter, with a product property set to the available width. So it could be 3.25 * 5 m (fixed with) = 16.25 m²
We have the price type (unit price, measurements, running meter, package) set in a property of the product.
Our current idea is to create custom pipeline methods, where depending on the price type we would multiply the amount * 1000 to allow for storage as an integer and divide by 1000 in the price calculations etc.
best way if non-integer quantities are required
We're setting up a store for floor coverings (carpets etc.) where there prices should be displayed for 1 m².
`However, for some products the user should be able to enter the room's width and length and buy the required amount of carpet, e.g. 3.5 m² x 4.5 m² = 15.75 m². Other products are sold by meter, with a product property set to the available width. So it could be 3.25 * 5 m (fixed with) = 16.25 m²
We have the price type (unit price, measurements, running meter, package) set in a property of the product.
Our current idea is to create custom pipeline methods, where depending on the price type we would multiply the amount * 1000 to allow for storage as an integer and divide by 1000 in the price calculations etc.
Would that be the best way?
You can add custom measures to individual order lines (read more in Dynamic Order Properties: Adding Custom Information to Baskets, Orders, and Order Lines). You could store measurements in cm² or mm² to avoid fractions :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.