Posts

news icon

WooCommerce Currency Switcher and cache – Making them work together

This article continues in WooCommerce and cache – Part 2: new Cache Handler plugin

One of the most common questions we receive from our customers is how to make a highly dynamic, multi-currency, multi-pricing, geolocation-enabled sites work properly with caching enabled. This is not always an easy task, because caching systems are designed with the assumption that the content served by a site doesn’t change depending on the visitor. Such assumption holds true in many cases, as a large number of sites does indeed serve the same content to whoever views a page. In such case, the standard behaviour of caching systems, which is storing one copy of each page in the cache, is acceptable.

As soon as multi-currency features are added, the same behaviour proves itself too limited, because the assumption behind it becomes incorrect. A multi-currency shop serves different content to different visitors, depending on the currency and other criteria (applicable taxes, regional pricing, etc). Quite simply, having one cached copy of each page just doesn’t cut it anymore.

Until recently, the only way to prevent caching from interfering with the multi-currency features was to disable it on catalogue pages. Doing so ensures that the shop can produce content dynamically, showing the correct information to each visitor. In some cases, when the caching system in use is too rigid, this is still the only solution.

How WooCommerce handles the issue

WooCommerce itself has to deal with caching since its team introduced geolocation features in it. The WC team added a workaround to “trick” caching systems into letting WooCommerce serve the correct data. Such workaround works by reloading the shop pages in a way that cache is ignored. This ensures that the page shows the correct content but, in our opinion, it’s not an ideal approach. We certainly appreciate the effort put into it, and the fact that there isn’t much more that a plugin can do to correct the behaviour of the caching system. However, we decided to find an alternative, more robust solution.

Our solution

Our opinion is that caching systems should adapt to your site, not the other way round. Issues caused by caching should be solved by fixing the caching. With this in mind, instead of implementing a workaround, we tackled the issue at its root, and wrote an algorithm for dynamic caching that takes into account the needs of a multi-currency website.

The algorithm is straightforward, and solves the issue by addressing its cause: instead of one copy of each page, it allows caching systems and plugins to store multiple copies of each page (such as one for each currency). With that in place, visitors from all over the world will see the content that applies to them, with the correct currency and taxes applied. If visitors choose another currency, or country, then our plugins track their choice, and the dynamic caching logic uses it to serve them the correct content.

Our solution grants top performance, with maximum flexibility.

Supported Systems

Dynamic caching is a great solution for highly dynamic, multi-currency sites. However, it can only work if the caching system in use supports it. As of October 2015, the following plugins and systems support, or are planning to support, dynamic caching.

WordPress Plugins

Caching Systems

For caching plugins and systems that do not support dynamic caching, disabling cache on catalogue pages is still necessary to allow the multi-currency features to work correctly.

How to add dynamic caching to your site

Adding it to your site can be as simple as copying one file, or changing one configuration file. In order to allow you to get started quickly, we wrote an implementation of dynamic caching for the following systems:

  • ZenCache/Comet Cache
  • Nginx

You can find detailed instructions to install and configure each of our solutions, as well as indications for other systems, in our knowledge base: How to add dynamic caching to your site.

We also discussed the implementation extensively with the WP Rocket Team, and provided them with code examples for integration. They confirmed that they are going to add support for dynamic caching and multi-currency sites directly in their plugin.

With dynamic caching and our Currency Switcher, your WooCommerce site will be faster and more flexible than ever!

What about systems that don’t support dynamic caching?

Plugins and caching systems that don’t support dynamic caching still have to be disabled on the catalogue, at least until they are updated. We believe that caching systems should be flexible, and support for dynamic caching is not particularly difficult to implement.

If you are using a plugin, or a caching system that doesn’t support dynamic caching, we recommend thar you get in touch with its authors and express your interest in such feature. You can also suggest them to contact us directly, if they have any questions. We will be happy to provide them with all the information they need to improve their solution.

Questions? Feedback?

We hope that you enjoyed this great news. A faster e-commerce means more customers, and that is always good! If you have any questions about our solutions, or if you would like to send us your feedback, please feel free to contact us. We will get back to you in no time.

Thank for your time and continued support.

The Aelia Team

news icon

WooCommerce 2.4.7 – Important changes in variable product prices

WooThemes just announced a change in the logic that WooCommerce uses to load the prices for variable products. The change, whose purpose is to fix possible issues related to the caching of incorrect product prices, can break compatibility with other plugin that rely on the existing logic. These changes are due to be added to of WooCommerce 2.4.7, which is due to be released on the 21st September 2015.

Which Aelia plugins are affected?

The change affects our Currency Switcher and our Prices by Country plugins. We are already at work to update our products and bring them up to speed with the new logic. We will release an update for both plugins in the next few days, so that you can install on your site before WooCommerce 2.4.7 becomes publicly available.

Important: you can install our updates as soon as they become available. As always, our plugins are fully backward compatible, and they will work with WooCommerce 2.4.6 and earlier.

Our other solutions, such as Shipping Pricing, Tax Display by Country and EU VAT Assistant will keep working correctly, they won’t need any modification.

Should you have any questions, please feel free to contact us through our support portal, and we will be happy to assist you.

Regards,

The Aelia Team

WooCommerce Shipping Pricing for Currency Switcher – WC 2.4 Admin UI improvement

Shipping Pricing Integration Add-on for WooCommerce Currency Switcher has been updated to version 1.1.12.150903. This update brings the following improvements and fixes:

  • Fixed bug in shipping methods admin user interface. The bug caused the shipping methods to always show as “enabled” or “disabled“, regardless of the actual setting.
  • Removed semaphore used to prevent multiple calls of shipping method’s initialisation. The bug in WC 2.4 that caused it to occur seems to have been fixed by the WooCommerce team.
  • Updated UI for Table Rates Shipping plugin. This update fixes the issue that prevented the sections in the Table Rates Shipping settings from collapsing and expanding.

How to get latest version

New customers

Simply place your order and you will get the latest version.

Existing customers

You should be able to download the updated file using the link you received with your order. If the link doesn’t work, please contact Support to receive the latest version. Thanks.

news icon

More great plugins now support our WooCommerce Currency Switcher

Support for our multi-currency solution is growing

We are delighted to inform you that, day by day, more developers are recognising the importance of adding support for multi-currency environments to their plugins. When we released our plugin, the WooCommerce Currency Switcher, in 2013, we were pioneers in this field. At the time, not only there wasn’t any solution to make WooCommerce truly multi-currency, but there was nobody interested in developing one, either.

At the time, we were told by many developers that supporting multiple currencies was “impossible“, that there was no way to make the shop work correctly with more than one currency, and that no merchant would ever be interested in having such feature on their site. We are proud to say that we proved them wrong.

The ever-growing popularity of our Currency Switcher, and our other internationalisation solutions, such as Prices by Country, Tax Display by Country, and EU VAT Assistant, is now attracting the interest of many developers, who regularly contact us to see how they can extend their solutions to support multi-currency environments. As always, we are happy to help our colleagues in their endeavours, and pleased to see that so many want to join our project.

Two (and a half) more plugins join the multi-currency world

As the title indicates, we are happy to announce that two (and a half) more plugins have now been updated to support out multi-currency solution:

  • WooCommerce Multiple Free Gift This plugin allows you to easily grant gifts to your customers, based on flexible, custom criteria. Rules such as “buy X, get Y free“, or “free gifts with any purchase” can be created easily, and applied to your customer’s cart automatically. We would like to thank its author, Ankit Pokhrel, for the good job he did, testing and extending his plugin together with our Currency Switcher to achieve maximum compatibility.
  • WooCommerce Role Based Price This is a great plugin for the merchant who is dealing with different types of customers. As the name indicates, the Role Based Price plugin allows to sell products at different prices, depending on the role held by a customer. Wholesalers, consumers, VIP clients, they can all get their own, dedicated price.The integration with our Currency Switcher now allows you to enter such prices ineach of the currencies you enabled, greatly increasing your pricing options.We would like to thank Varun Sridharan for the effort he put into adding multi-currency support to his plugin. He is a great example of dedication, and his excellent work reflects that.
  • WooCommerce Product Fees This is the “half” plugin that we mentioned at the beginning of the paragraph. The reason why we call it “half” will be clear shortly.The WooCommerce Product Fees plugin was released on the 25th August 2015 by Caleb Burks, a member of WooThemes Support Team and, less than 24 hours later, we had extended it with full support for multiple currencies. Our integration added support for per-currency product fees, with automatic conversions as a fallback, while still maintaining full backward compatibility with single-currency environments.The above took us less than two hours of work, which is a great indicator of how easy it is to interface with our multi-currency solution.

    Why “half” plugin?
    Unfortunately, the author of the WooCommerce Product Fees plugin informed that, although our integration worked perfectly, he deemed it not to be important enough to be included in the main release. He reckoned that it would add unnecessary complexity, therefore he decided to leave the integration out for the moment, and to review it at a later stage. We respectfully disagree with such decision, for two reasons:

    1. Our extension required very few changes in the original code, and it doesn’t make the plugin much more complex.
    2. It’s easier to “think multi-currency” from the beginning of a plugin’s development, rather than try to “retrofit” such feature in a more complex product months, or years later.

    Of course, we do not want to enforce our vision and goals on anybody. We believe in collaboration, and freedom of choice is of utmost importance to us. We limited ourselves to explaining in detail why we believe that our integration should be part of the Product Fees plugin, and we will be happy to help Caleb in implementing it in the future. In the meantime, if you would like how a multi-currency aware of Product Fees plugin could work, you can get it from our Github fork: https://github.com/aelia-co/WooCommerce-Product-Fees.

    Important: please note that we only extended the first version of the plugin, which might have now been updated by its author. If you download the latest version of the Product Fees plugin, you will probably have to re-apply our changes to it.

Acknowledgements

We do understand that, despite one’s best effort, it’s not always viable to extend an existing product to work seamlessly in a multi-currency environment, and we appreciate all the effort put into it, no matter the final outcome. We would like to take the opportunity to extend our thanks to all the developers who worked on an integration, whether they decided to complete it or not. Thanks to all of you for your continued support and contributions!

The Aelia Team

WooCommerce Subscriptions Integration – WC 2.4 fix (variations)

Subscriptions Integration Add-on for Currency Switcher for WooCommerce 2.0.x/2.1.x has been updated to version 1.2.9.150815. This update brings the following improvements and fixes:

  • Improved support for WooCommerce 2.4. Fixed issue caused by the logic used to handle variations in WooCommerce 2.4.3. The issue could cause Subscriptions to appear with a price of zero in some circumstances.
  • Fixed minor bugs in user interface. Removed notice messages from pricing interface for simple and variable subscriptions and fixed reference to text domain variable in variable subscriptions pricing interface.
  • Updated logic used to for requirements checking.
  • Updated logic used to check for updates.

Important: Subscriptions Integration Add-on requires Currency Switcher 3.3.11.140619 or later.

How to get latest version

You can download the plugin from the product page, free of charge. Support can be purchased separately.

WooCommerce Shipping Pricing for Currency Switcher 1.1.10.150815

Shipping Pricing Integration Add-on for WooCommerce Currency Switcher has been updated to version 1.1.10.150815. This update brings the following improvements and fixes:

  • Fixed minor warning in shipping template classes. The warning was raised due to a redundant “use” clause. The bug did not affect the correct working of the plugin, and did not cause any side effect, apart from some unsightly warning messages.

How to get latest version

New customers

Simply place your order and you will get the latest version.

Existing customers

You should be able to download the updated file using the link you received with your order. If the link doesn’t work, please contact Support to receive the latest version. Thanks.