Skip to content

Add back-end currencies for yours products and set up rates. All prices will be converted to main currency and multiply by rate.

License

Notifications You must be signed in to change notification settings

restot/spree-custom-currency-rates

Repository files navigation

Spree Custom Currency Rates

Req. Spree => 3

You can setup another currencies and rates.

Logic next:

  1. Get product.variant.currency
  2. If product.variant.currency == MainCurrency
  3. product.price * MainCurrency.rate # yep you can specified a main currency rate
  4. else product.price * product.variant.currency.rate

In admin panel in column price you can see product price in original currency and price in main currency if original currency exist.

Note: After install gem, all prices on your shop proceed this gem. Note: If you dont want change main currency rate, just create this currency with rate 1, you can see main currency rate in first fake row in "AdminPanel -> Rates" # its not bug, its feature

Installation

  1. Add this extension to your Gemfile with this line:
gem 'spree_custom_sale_rates_from_currency', github: 'restot/spree_custom_sale_rates_from_currency'
  1. Install the gem using Bundler:
bundle install
  1. Copy & run migrations
bundle exec rails g spree_custom_sale_rates_from_currency:install
  1. Restart your server

If your server was running, restart it so that it can find the assets properly.

About

Add back-end currencies for yours products and set up rates. All prices will be converted to main currency and multiply by rate.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published