The Checkout Addons plugin introduces the possibility of adding options to an order, on the checkout page. Out of the box, the plugin doesn't pass the prices of addons to the currency conversion functions. This causes their value to remain the same for all currencies.
The best way to ensure that the prices of the checkout addons are converted correctly would be to add multi-currency support directly to the Checkout Addons plugin. Its interface could be extended to allow merchants to enter different addon prices for different currencies, and select the correct price depending on the active currency. This would require an update of the code in the original Checkout Addons plugin, and it would have to be implemented by its authors.
If you're interested in these features, we would recommend to inform the authors of the Checkout Addons plugin, so that they can prioritise its development accordingly.
1. How to pass the prices of addons to the conversion functions
Since the Checkout Addons doesn't interface with the multi-currency core, an external patch will be needed to intercept the prices of addons and pass them to the conversion functions provided by the Aelia Currency Switcher. Below you can find the instructions to implement such an integration.
- The code in this article is meant as a proof of concept. It's provided as is, without guarantees, and it's outside the scope of our support service.
- If you're not familiar with coding, we would recommend to contact your developers. They will be able to implement, test and tweak the custom code for you.
1.1. Prepare a mini-plugin to host the code
The code to intercept and convert the prices of checkout addons can't be put inside the theme's functions.php, because that file may be loaded too late. That would make the code ineffective.
To ensure that the code runs early enough, you can implement a small plugin, as follows:
1.2 Add the custom code to to convert the checkout addons
After adding the custom code to your site, the prices of the checkout addons should be converted automatically, from your shop's base currency to the active currency, using the exchange rates configured in the Currency Switcher settings.
2. Contact us if you have any questions
As indicated at the top of the article, all the code examples are provided on an "as is" basis, and they fall outside the scope of our support service. Although we won't be able to implement them for you, nor provide a guarantee that they will work, we will be happy to answer any questions you might have. You can simply contact us, and we will get back to you as soon as possible.