Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add price_formatted and list_price_formatted fields #2

Open
wants to merge 1 commit into
base: convert-fixes
Choose a base branch
from

Conversation

pikulsky
Copy link

Clerk module has built-in "price" and "list_price" fields to sync. They both are float.
When it comes to display these prices to user, for the moment it's possible to use Clerk's formatting methods (see https://docs.clerk.io/docs/template-language), there are two functions: "money" and "money_eu". E.g.:
{{money price 2 "," "."}}
{{money list_price 2 "," "."}}

This way the information how to format a currency is doubled: Magento itself has currency format for prices, now Clerk should know how to format prices. I think the better approach is to have a "single source of truth": so, Magento formats prices and sends it to Clerk, Clerk should not keep any logic how to format data, Clerk should display it as it is.

…es for built-in price and list_price fields
@pikulsky pikulsky requested a review from unicoder88 July 11, 2019 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant