View Issue Details

IDProjectCategoryView StatusLast Update
0010506Talermerchant backendpublic2025-12-21 20:47
ReporterBohdan Assigned ToBohdan Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version1.3Fixed in Version1.3 
Summary0010506: Standardised units of products for Merchant Backend
DescriptionTo make a better UX for the future order template update, we want to introduce the idea of N+ and R+ numbers for the quantity of the products in orders.

Which can theoretically be added just by changing int to float, yet it will create a possible situation:
A merchant sells Gruyère 400g, described as “1 piece.”
After switching to floats, a buyer could theoretically order 1.2 pieces — representing 480g — which is valid in terms of math, but nonsensical in terms of inventory management and packaging.

To avoid such a situation, we have to introduce preset strings, depending on which it will be prescribed for which units, you can have a float positive number, and for which integer

To int we define:
Piece, Set, WeightUnitMg, SizeUnitMm, Custom(means merchant provided its own string as this object, will be processed as a legacy option)

To float:
WeightUnitTon, WeightUnitKg, WeightUnitG, WeightUnitOunce, WeightUnitPound, SizeUnitM, SizeUnitDm, SizeUnitCm, SizeUnitMm, SizeUnitFoot, SizeUnitInch, SurfaceUnitM2, SurfaceUnitDm2, SurfaceUnitCm2, SurfaceUnitMm2, SurfaceUnitFoot2, SurfaceUnitInch2, VolumeUnitM3, VolumeUnitDm3, VolumeUnitCm3, VolumeUnitMm3, VolumeUnitFoot3, VolumeUnitInch3, VolumeUnitOunce, VolumeUnitLitre, VolumeUnitGallon, TimeUnitSecond, TimeUnitMinute, TimeUnitHour, TimeUnitDay, TimeUnitWeek, TimeUnitMonth, TimeUnitYear

To keep it fully customizable, a new object has to be specified to override the predefined behavior (e.g., allow_fractional_quantity?: boolean;)

To show it in a nice way to the user, we want to predefine the level of precision for each of the types.

0:
WeightUnitMg, SizeUnitMm

1:
WeightUnitG, SizeUnitCm, SurfaceUnitMm2, VolumeUnitMm3

2:
WeightUnitOunce, SizeUnitInch, SurfaceUnitCm2, VolumeUnitOunce, VolumeUnitInch3, TimeUnitHour, TimeUnitMonth

3:
WeightUnitTon, WeightUnitKg, WeightUnitPound, SizeUnitM, SizeUnitDm, SurfaceUnitDm2, SurfaceUnitFoot2, VolumeUnitCm3, VolumeUnitLitre, VolumeUnitGallon, TimeUnitSecond, TimeUnitMinute, TimeUnitDay, TimeUnitWeek

4:
SurfaceUnitM2, SurfaceUnitInch2, TimeUnitYear

5:
VolumeUnitDm3, VolumeUnitFoot3

6:
VolumeUnitM3

All of these levels can be overridden with fractional_precision_level: int

GET/POST/PATCH of products is affected.
Verification on the order creation must be added based on the product options.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0010382 closedBohdan Standardised units for SPA 
related to 0010507 closedBohdan New type of templates that includes products selection 

Activities

There are no notes attached to this issue.

Issue History

Date ModifiedUsernameFieldChange
2025-10-17 18:49BohdanNew Issue
2025-10-17 18:49BohdanStatusnew => assigned
2025-10-17 18:49BohdanAssigned To => Bohdan
2025-10-17 18:59BohdanRelationship addedrelated to 0010382
2025-10-17 18:59BohdanRelationship addedrelated to 0010507
2025-10-18 22:57Christian GrothoffSeveritymajor => feature
2025-10-19 07:57Christian GrothoffTarget Version1.3 => 1.4
2025-10-26 21:24BohdanDescription Updated
2025-10-26 21:26BohdanDescription Updated
2025-10-27 13:19BohdanDescription Updated
2025-11-25 21:55BohdanStatusassigned => informing
2025-11-25 21:55BohdanResolutionopen => fixed
2025-11-25 21:55BohdanFixed in Version => git (master)
2025-11-26 20:11Christian GrothoffFixed in Versiongit (master) => 1.3
2025-11-26 20:11Christian GrothoffTarget Version1.4 => 1.3
2025-12-21 20:47Christian GrothoffStatusinforming => closed