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 option to add spacing between currency sign and price #3574

Merged

Conversation

cewald
Copy link
Contributor

@cewald cewald commented Sep 18, 2019

Related issues

Add an config option to add a spacing between the price currency sign and the price, like 13,99 € or € 13,99.

Short description and why it's useful

This is a common use case in some countries and should be configurable in my opinion.

Which environment this relates to

Check your case. In case of any doubts please read about Release Cycle

  • Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
  • RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
  • Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility and no breaking changes)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change

Contribution and currently important rules acceptance

@andrzejewsky
Copy link
Contributor

@cewald it's ok, instead of adding just configurable space, you can introduce currency format. In the config file you can store just format like:

priceFormat: '{sign} {amount}'

and then you can even simply replace it:

config.priceFormat.replace('{sign}', currencySign).replace('{amount}', formattedPrice)

what do you thing about that? I think it's more flexible, you can manipulate the displayed currency.

@cewald
Copy link
Contributor Author

cewald commented Sep 18, 2019

@andrzejewsky Yes, thats better. And this way we consolidate both functionalities of currencySignPlacement and currencySignSpacing to one config option. I updated the code.

Copy link
Collaborator

@patzick patzick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice improvement :) thanks!

@patzick patzick added this to the 1.11.0-rc.1 milestone Sep 19, 2019
@patzick patzick merged commit a4f2039 into vuestorefront:develop Sep 19, 2019
@cewald cewald deleted the feature/add-space-option-for-price branch September 19, 2019 11:35
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.

3 participants