Are there any guidelines on setting up products/stock for items that are sold/tracked by measure? #12022
-
Hello, Many industries sell items by measure that are tracked in decimal quantities. For example: fabric by the metre/yard and flooring by sqm. I'm not seeing any guidelines on how to set this up within Spree. If there are no existing resources for this, how risky will it be, for a project only using the lastest spree_core release, to update for decimals on all related models? I figure we can address measure and conversion mostly outside of the Spree core - only needing to add a measurement_type column to any related tables. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Rather than using decimals the easiest route would be to use measurement in mm vs metre/cm etc. Eg. payment providers like Stripe store amounts in integers and later transform them to decimals to display to the customer. If you use multiple metric systems adding an additional column to specify what type of metric (mms/inches) would also work. |
Beta Was this translation helpful? Give feedback.
Rather than using decimals the easiest route would be to use measurement in mm vs metre/cm etc.
Eg. payment providers like Stripe store amounts in integers and later transform them to decimals to display to the customer.
If you use multiple metric systems adding an additional column to specify what type of metric (mms/inches) would also work.