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

Support for currency #182

Open
racke opened this issue Jul 18, 2015 · 5 comments
Open

Support for currency #182

racke opened this issue Jul 18, 2015 · 5 comments

Comments

@racke
Copy link
Member

racke commented Jul 18, 2015

I would like to add currency column to prices, orders, payment orders etc. For example it allows us to offer products in other currencies, payments with different currency etc.

@SysPete
Copy link
Member

SysPete commented Nov 19, 2015

Perhaps a Currency class should be added which tracks 'active' currencies? We would also need to track exchange rates in another table and have this populated from an external service so we know which rate is/was valid at a particular date/time.

Looking towards multi-shop we would need a link table between the Shop/Site class and Currency class sinec not all shops will support the same currencies. CurrencyExchange class should probably track rates for all shops with some currency markup percentage stored either per-shop in Shop or per-currency in ShopCurrency link table.

@racke
Copy link
Member Author

racke commented Nov 19, 2015

Yes that sounds good.

@SysPete SysPete added this to the Multistore milestone Nov 24, 2015
@SysPete
Copy link
Member

SysPete commented Nov 24, 2015

This is currently being worked on in branch topic/multistore_gh27

@SysPete SysPete removed this from the Multistore milestone Dec 3, 2015
@SysPete
Copy link
Member

SysPete commented Dec 3, 2015

Currency work moved to master branch since multistore has been put on back burner.

We have two new classes:

  • Currency
  • ExchangeRate

The only class using Currency so far is Cart but it also needs to be added to the various Order* classes.

Current plan is to use CLDR::Currency for currency locales and to build something similar to Math::Currency for currency maths and exchange conversions.

@SysPete
Copy link
Member

SysPete commented Dec 3, 2015

The current view is that there will be only one currency for the shop that is used for all product pricing and active 'foreign' currencies will be available for display and payment. Order* classes should record standard shop currency as well as foreign currency amounts.

Exchange rates can be filled in manually by shop owner or a converter class can be set in which case that will be used to fetch and store exchange rates. A working example of a converter class will be included in the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants