This addon adds in the header of the front area a select box of currencies set from the Admin panel.

Features

  • This addon adds in the header of the front area a select box of currencies set from the Admin panel.
  • And, allow users to get estimation of the items prices in other currencies.

Here is the list of the currently implemented services:
For certain currency exchange rate services, you need to get an API credentials.

  • currencylayer.com - Get Access Key here.
  • exchangerate-api.com - Get API Key here.
  • exchangeratesapi.io - Get Access Key here.
  • openexchangerates.org - Get App ID here.
  • fixer.io - Get Access Key here.
  • European Central Bank - Check out the data here.
  • Russian Central Bank - Check out the data here.
  • Central Bank of Turkey - Check out the data here.
  • National Bank of Ukraine - Check out the data here.
  • Central Bank of the Czech Republic - Check out the data here.
  • National Bank of Romania - Check out the data here.

Compatibility

  • v5.0.2 => LaraClassifier v19.1.3+
  • v5.0.1 => LaraClassifier v19.1.0+
  • v5.0.0 => LaraClassifier (v19.0.0 to v19.0.1)
  • v4.3.7 => LaraClassifier v18.3.0+
  • v4.3.6 => LaraClassifier v18.2.0
  • v4.3.5 => LaraClassifier v18.1.0 to v18.1.1
  • v4.3.4 => LaraClassifier v18.0.3
  • v4.3.3 => LaraClassifier v18.0.2
  • v4.3.2 => LaraClassifier v18.0.1
  • v4.3.1 => LaraClassifier v18.0.0
  • v4.3.0 => LaraClassifier (v17.0.0 to v17.1.1)
  • v4.2.9 => LaraClassifier v16.0.1 to v16.0.2
  • v4.2.8 => LaraClassifier v16.0.0
  • v4.2.7 => LaraClassifier v15.4.0 to v15.4.1
  • v4.2.6 => LaraClassifier v15.3.4 to v15.3.5
  • v4.2.5 => LaraClassifier v15.3.4
  • v4.2.4 => LaraClassifier v15.1.6 to v15.3.3
  • v4.2.3 => LaraClassifier v15.1.5
  • v4.2.2 => LaraClassifier v15.1.4
  • v4.2.1 => LaraClassifier v15.1.3
  • v4.2.0 => LaraClassifier v15.1.0 to v15.1.2
  • v4.1.0 => LaraClassifier v15.0.0
  • v4.0.0 => LaraClassifier v14.0.0 to v14.2.0
  • v3.1 => LaraClassifier v12.0.0 to v13.0.0
  • v3.0 => LaraClassifier v11.0.0 to v11.0.4
  • v2.3 => LaraClassifier v10.2.0 to v10.2.6
  • v2.2 => LaraClassifier v10.0.2 to v10.1.4
  • v2.1 => LaraClassifier v10.0.0 to v10.0.1
  • v2.0 => LaraClassifier v7.3.0 to v9.0.1
  • v1.9 => LaraClassifier v7.3.0
  • v1.8 => LaraClassifier v7.2.0 to v7.2.4
  • v1.7 => LaraClassifier v7.1.0 to v7.1.1
  • v1.6 => LaraClassifier v7.0.0 to v7.0.4
  • v1.4 to v1.5 => LaraClassifier v6.8 to v6.9
  • v1.3 => LaraClassifier v6.6 to v6.7
  • v1.2 => LaraClassifier v6.0 to v6.5
  • v1.1 => LaraClassifier v5.2 to v5.9
  • v1.0 => LaraClassifier v5.1

Installation

Step 1: Upload the add-on

Go to Admin panel → Extensions → Add-ons, click Upload add-on and drop the add-on's .zip file into the upload area (50 MB maximum). The archive is extracted into extensions/addons/currencyexchange/ and Currency Exchange appears in the list, deactivated.

Cannot upload from the browser? Unzip the archive on your computer and copy the add-on folder to extensions/addons/currencyexchange/ over FTP or SSH: its addon.json file must sit directly inside that folder. Then open Admin panel → Extensions → Add-ons. The page scans extensions/addons/ every time it loads, so the add-on is listed straight away (the Sync button runs the same scan on demand).

Step 2: Activate the add-on

Click Activate on the Currency Exchange card. It is a paid add-on, so a dialog asks for its purchase code, which is verified before anything else happens: an invalid code is rejected in the dialog and nothing is changed.

Once the code is accepted, activation runs in one pass: it creates the add-on's database tables (its migrations), registers its permissions, runs its seeders and publishes its public assets. Reload the page to see its new entry in the Add-ons section of the admin sidebar.

Step 3: Configure

Open Admin panel → Currency Exchange from the Add-ons section of the sidebar and set the add-on up: see Usage.

Purchase Code (License Key)

Currency Exchange is sold as a separate product, so it has its own purchase code (license key), distinct from the purchase code of the main application and from the one of every other add-on. You are asked for it when you activate Currency Exchange in Admin panel → Extensions → Add-ons.

Our products are sold on three platforms. The way you receive a purchase code depends on where you bought the product.

Platform / Marketplace How you get the purchase code Where to find it again
bedigit.com Store
In-site purchase (Shop)
Generated automatically when the order is paid, then sent by email, either in its own license email, or inside the order confirmation email. My Account → My Licenses on bedigit.com
Gumroad Created as soon as Gumroad notifies us of the sale, then sent in a separate email, in addition to the Gumroad receipt. The license email, your Gumroad Library, and My Account → My Licenses on bedigit.com
Envato Market
CodeCanyon
Issued by Envato, not by us, and never sent by email: you download it yourself from your Envato account. Envato account → Downloads → License certificate & purchase code
Check your spam folder. For both bedigit.com Store and Gumroad purchases, the purchase code is delivered by email. Automated license emails are very often filtered, so if the message is not in your inbox, look in your spam / junk folder before contacting support, and add our sender address to your contacts or allow list.

1. bedigit.com Store (in-site purchase)

  • As soon as the order’s payment status becomes Paid, a license key is generated automatically for every licensed item in the order (one key per purchased unit: buying 3 units gives 3 distinct keys).
  • It is emailed to the address used on the order, either in a dedicated license email or inside the order confirmation email. Check your inbox and your spam / junk folder.
  • The key stays available in your account under My Account → My Licenses. Keys are masked in the list; open the license detail page to reveal and copy the full key, see the domains it is activated on, and deactivate a domain to free an activation slot.
  • The matching invoice is under My Account → My Orders.

2. Gumroad

  • A Gumroad purchase produces two separate emails: the Gumroad receipt (sent by Gumroad, giving access to the files) and a license key email (sent by bedigit.com) that contains your purchase code.
  • The license key email is generated as soon as Gumroad notifies us of the sale, so it normally arrives within seconds of the payment. Here too, check your inbox and your spam / junk folder.
  • When the Gumroad product uses Gumroad’s own license-key feature, the same key also appears in your Gumroad receipt and under Library → your purchase on gumroad.com.
  • Use the same email address on bedigit.com as on Gumroad: your keys are then linked to your account automatically and listed under My Account → My Licenses, even if you register after the purchase. You can also add a Gumroad key manually from My Account → My Gumroad Licenses.

3. Envato Market (CodeCanyon)

  • Envato purchase codes are issued and delivered by Envato Market, never emailed by us, so there is nothing to look for in your spam folder: you retrieve the code from your Envato account.
  • Log in to your Envato / CodeCanyon account, open the Downloads page, find the item, and choose License certificate & purchase code from the Download dropdown. The code is written in that certificate.
  • An Envato purchase code looks like 12345678-90ab-cdef-1234-567890abcdef (8-4-4-4-12 characters). It never changes, and renewing item support does not issue a new one.
  • Official Envato article: Where Is My Purchase Code?
Lost your purchase code? Search your mailbox (spam folder included) for “license” or “purchase code”, then check My Account → My Licenses on bedigit.com for Store and Gumroad purchases, or Downloads → License certificate on Envato. If it is still missing, open a ticket on our Help Center with your order number (Store), Gumroad sale ID or buyer email (Gumroad), or Envato username and item name (Envato).

Updating

An update only replaces the add-on's files. Its database tables and data, its settings, its activation state and its recorded purchase code are all kept, so do not deactivate or remove the add-on before updating it. Back up your database first all the same.

Method 1: Upload the new version (recommended)

  1. Download the latest .zip file of the add-on.
  2. Go to Admin panel → Extensions → Add-ons and click Upload add-on.
  3. Drop the .zip file into the upload area.
  4. Because Currency Exchange is already installed, a prompt shows the installed version and the new one. Click Replace: the extensions/addons/currencyexchange/ folder is swapped for the new files. Cancelling the prompt discards the upload.

Method 2: Replace the files by hand

  1. Over FTP or SSH, delete the extensions/addons/currencyexchange/ folder and upload the new one in its place. Replace the whole folder rather than copying over it, so files dropped by the new version do not linger.
  2. Open Admin panel → Extensions → Add-ons: the page re-reads addon.json and the card shows the new version number.

After the files are replaced

New database tables or columns. When a new version adds some, create them by running php artisan migrate --force over SSH, or without SSH by clicking Deactivate then Activate on the add-on's card: activation runs every pending migration (and asks for the purchase code again). Your data is not touched either way.

If your installation caches its configuration or routes (php artisan config:cache, route:cache), run php artisan optimize:clear after the update.

Usage

Go to Admin panel → Currency Exchange (in the Add-ons section of the sidebar). The settings page has three tabs; click Save to apply your changes.

General

FieldDescriptionDefault
Enable the Currency ExchangeShows the currency selector in the header of the website and converts the listing prices into the currency the visitor selects. When disabled, prices are shown in the country's currency only.On
CurrenciesThe currencies offered in the selector, picked from the currencies defined in Admin panel → International → Currencies (you can also type an ISO 4217 code and press Enter). The current country's own currency is always added to the list.USD, EUR

Currencies per country. To offer a different list in a given country, go to Admin panel → International → Countries, edit that country and fill in its Currencies field (shown only while the add-on is active) with ISO 4217 codes separated by commas, for example USD,EUR,CHF. Codes are saved in upper case and duplicates are removed. For visitors browsing that country, this list replaces the Currencies setting above; leave the field empty to use the setting.

Service

FieldDescription
ServiceThe provider the exchange rates are retrieved from. The fields of the selected service are shown below it (see the table that follows). Default: European Central Bank.
Validate the Service's responseWhen enabled, saving the form sends a test request to the selected service with the credentials entered, and the settings are only saved if the service answers correctly.
ServiceFields
currencylayer.comCurrency Base (USD), Use pro version of this service, Access Key (required when the pro version is enabled)
exchangerate-api.comCurrency Base (USD), API Key (required)
exchangeratesapi.ioCurrency Base (EUR), Use pro version of this service, Access Key (required when the pro version is enabled)
openexchangerates.orgCurrency Base (USD), App ID (required)
fixer.ioCurrency Base (EUR), Use pro version of this service, Access Key (required when the pro version is enabled)
European Central Bank, Russian Central Bank, Central Bank of Turkey, National Bank of Ukraine, Central Bank of the Czech Republic, National Bank of RomaniaNo field: no API key is required. Their base currency is fixed (EUR, RUB, TRY, UAH, CZK and RON respectively).

Currency Base is the source currency of the rates. The free plans of the paid services only work with their default base currency, so leave it unchanged unless you use a pro plan.

Options

FieldDescriptionDefault
Cache TTLHow long, in seconds, the exchange rates are kept before they are retrieved again from the service.86400 (24 hours)

Exchange rates

The retrieved rates are stored on the currencies. While the add-on is active, the currency form in Admin panel → International → Currencies shows an Exchange Rate field that you can edit by hand, for example for a currency the selected service does not provide. A manual rate is overwritten the next time the rates are retrieved, so increase the Cache TTL if you maintain rates by hand. When no rate is available for the selected currency, prices stay in the country's currency and a warning is shown.

Environment variables

The following optional .env keys take precedence over the values saved in the admin panel:

  • CURRENCY_EXCHANGE_DRIVER (currencylayer, exchangerate_api, exchangeratesapi_io, openexchangerates, fixer_io, ecb, cbr, tcmb, nbu, cnb or bnr) and CURRENCY_EXCHANGE_CACHE_TTL
  • CURRENCYLAYER_ACCESS_KEY, CURRENCYLAYER_BASE, CURRENCYLAYER_PRO
  • EXCHANGERATE_API_KEY, EXCHANGERATE_API_BASE
  • EXCHANGERATESAPI_IO_ACCESS_KEY, EXCHANGERATESAPI_IO_BASE, EXCHANGERATESAPI_IO_PRO
  • OPENEXCHANGERATES_APP_ID, OPENEXCHANGERATES_BASE
  • FIXER_IO_ACCESS_KEY, FIXER_IO_BASE, FIXER_IO_PRO

Translation

To translate this addon into your language:

  • Go to the addon languages directory in the core app's /extensions/addons/currencyexchange/resources/lang/
  • Duplicate the folder /extensions/addons/currencyexchange/resources/lang/en/ to /extensions/addons/currencyexchange/resources/lang/<code>/
    NOTE: Don't forget replace <code> by your language code (e.g. "de" for German language).
  • Open the file /extensions/addons/currencyexchange/resources/lang/<code>/messages.php and translate it.
    NOTE: To translate the file, you must change the values and not the keys of the PHP array.

Uninstallation

Switching an add-on off without losing anything is a deactivation: go to Admin panel → Extensions → Add-ons, click Deactivate on the Currency Exchange card and confirm.

  • The add-on is no longer loaded: its routes, views, admin sidebar entry and front-end pages stop answering.
  • Its database tables and all the data they hold are kept, and its files stay under extensions/addons/currencyexchange/. Nothing is deleted.
  • Its permissions and its recorded purchase code stay in the database. Only Remove deletes them.
  • Deactivation is refused while another active add-on depends on this one: deactivate that add-on first.

Click Activate on the same card to switch it back on. As for a first activation, the purchase code is asked for and verified again; then any pending migrations run, the assets are republished, and the add-on picks up exactly where it left off.

Removing

Removing is permanent and destroys the add-on's data. The Remove button only appears on a deactivated add-on, so removal is always two steps:

  1. Deactivate Currency Exchange (see Uninstallation).
  2. Click Remove on its card and confirm the prompt.

The admin panel then, in one pass:

  • runs the add-on's uninstall hook, if it ships one, while its code is still on disk;
  • revokes the permissions declared in its addon.json;
  • rolls back its migrations (this drops its database tables and every row they hold) and purges its entries from the migrations table, so a later reinstall migrates from scratch;
  • deletes its published assets: public/addons/currencyexchange/, public/vendor/currencyexchange/ and storage/app/public/addons/currencyexchange/;
  • deletes the add-on directory extensions/addons/currencyexchange/;
  • deletes its row in the addons table (the recorded purchase code goes with it) and clears the application cache.
This cannot be undone. Back up your database before removing an add-on whose data you may still need: installing it again later creates empty tables, not your old content, and asks for the purchase code again.

Removal is refused, with an explanatory message and before anything is destroyed, when the add-on is still active, when another active add-on depends on it, or when the web server (PHP) user cannot delete extensions/addons/currencyexchange/. In that last case, give that user write permission on the directory and on its parent, then try again.

Deleting the folder over FTP or SSH is not equivalent: the add-on is only switched off, and its tables, its entries in the migrations table and its addons row are all left behind. Use Remove in the admin panel instead.

Was this article helpful?

Thank you for your feedback!

Still need help? Create a support ticket

Create a Ticket