Install the custom exchange rate provider

Before installing your provider, build your project and make sure there are no errors. It is important to build first, because your new provider class must be successfully compiled into the project. If your provider is in a separate assembly, first add a reference to that assembly in your Sitefinity CMS application project.

To install the provider you must perform the following:

  1. Log into Sitefinity CMS backend.
  2. In the main menu in the upper part of the screen, click Administration » Settings.
  3. Go to the Advanced settings by clicking the Advanced link.
  4. In the treeview on the left, click Ecommerce » MultiCurrency » ExchangeRatesServiceProviders.
  5. To add a new provider, click Create New.
  6. In the Id field enter a GUID. You can get one by using the GUID generator in Visual Studio. You can find under Tools » Create GUID.
  7. In the Name field enter the programmatic name of the exchange rate provider.
  8. In the Title field enter the title of the exchange rate provider.
  9. In the Description field (optional) enter a description of the exchange rate provider.
  10. In the IsActive field, specify whether or not the exchange rate provider is active or not. If the provider is not active then you cannot use it.
  11. In the EnableLogging field, specify whether more detailed error/response messages will be logged in the trace file in Sitefinity CMS. You can locate this file at App_Data/Sitefinity/Logs/Trace.Log.
  12. In the SettingsType field enter the CLR name of the settings class for the exchange rate provider. If the type does not exist, the validation of the field will fail.
  13. In the ProviderType field enter the CLR name of your RateProviderBase implementation. If the type does not exist, the validation of the field will fail.
  14. Click Save changes.

Your exchange rates provider is now registered in the Ecommerce provider.

Entering connection settings

Once you have saved your changes, your new provider will show up in the MultiCurrency list. You will notice that there is an additional menu option for your provider called ConnectionSettings. The fields present in the connection settings represent the properties of the exchange rate settings class. The data you enter in these fields will be available in the ExchangeRateRequest object passed to the GetExchangeRates method in the provider class. You can use these settings to call an external web service URL and use the username and password values for authentication.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?