Open racke opened 9 years ago
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.
Yes that sounds good.
This is currently being worked on in branch topic/multistore_gh27
Currency work moved to master branch since multistore has been put on back burner.
We have two new classes:
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.
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.
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.