-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Rethink the commerce.price method #2579
Copy link
Copy link
Open
Labels
breaking changeCannot be merged when next version is not a major releaseCannot be merged when next version is not a major releasec: bugSomething isn't workingSomething isn't workingc: refactorPR that affects the runtime behavior, but doesn't add new features or fixes bugsPR that affects the runtime behavior, but doesn't add new features or fixes bugsm: commerceSomething is referring to the commerce moduleSomething is referring to the commerce modulep: 1-normalNothing urgentNothing urgent
Milestone
Metadata
Metadata
Assignees
Labels
breaking changeCannot be merged when next version is not a major releaseCannot be merged when next version is not a major releasec: bugSomething isn't workingSomething isn't workingc: refactorPR that affects the runtime behavior, but doesn't add new features or fixes bugsPR that affects the runtime behavior, but doesn't add new features or fixes bugsm: commerceSomething is referring to the commerce moduleSomething is referring to the commerce modulep: 1-normalNothing urgentNothing urgent
Fields
Give feedbackNo fields configured for issues without a type.
Currently the price method generates prices like this
"$5.39". This has several drawbacks, as some currency symbols are written behind the price instead of in front. Some might want an extra space...There is also the thing about the prices, that require fine tuning of the dec parameter depending on the generated value.
e.g.
Prices are also very often used as numbers e.g. if they are combined with quantities:
So commerce.price() should return
number.Summary
commerce.price()should returnnumber.decparameter should be determined automatically (unless set specifically)symbolparameter should be removed#See also