10. October 2014 15:23 by John Dillon, 0 Comments
One of the best things about modern eCommerce platforms such as NopCommerce is the range of features you get out of the box. 5 years ago, if a client came to us wanting a multi language, multi currency site, set automatically by IP, we would have quoted them a figure that would have made them think twice. These days we can do most of it right out the box, and this is exactly what the requirements were for http://www.goforitgames.com/.
Multi-lingual websites are complicated things to build, but its done well in NopCommerce. Once setup in the CMS, a client can control pretty much anything they want to using the localisation settings. This ranges from text on buttons, to about us pages, to product descriptions and much more.
Multi currency is also built into NopCommerce. Currencies can either be set automatically using a web service, or set manually.
The one limitation we encountered here is that prices cannot be set specifically per language per product (i.e. make a product £3.99 but then $5.99 for the US). Prices are set by converting the default currency to the active currency. The problem here is that it doesn’t always give clean prices, so for example £4.99 becomes $8.04. A client may want to make this $7.99 so its less obviously a converted price.
Fortunately this is a feature which is being built into NopCommerce for the next release (https://nopcommerce.codeplex.com/workitem/9291), so for future builds it won’t be an issue. In our case however we explored 2 workarounds.
- The simpler solution is by being creative with manual exchange rates. This generally works best with a small range of products but its a very simple solution.
- The second solution is to use tier pricing in a multi store environment. To clarify NopCommerce is a multi store application, meaning you can have multiple stores (websites) from the same product base. Tier pricing on the other hand is used for volume discounts. So for example for X product you say that if the user purchases 10 items they get them for £3.99 each instead of £4.99. Tier pricing can be set per language, so the trick is to set product prices per language using this method, and set the quantity to 1. This makes it slightly trickier to set prices but it works.
Other than this there were 2 main other customisations we needed to make for this project:
- Automatically selecting language/country based on IP address
When a user first comes to http://www.goforitgames.com/ we need to select which language/currency to show them. NopCommerce by default selects this based on the language settings in a users browser. This wasn’t the best solution to us because more often than not (as was the case with the client) these default to US, as its not something the user always configures. Therefore whilst it has its faults, selecting this based on IP was our preferred route. So we changed it to select based on IP, and if that fails (i.e. it cant match based on IP) we default to browser settings.
- Selecting language/country also needs to select currency
By default NopCommerce allows you to select language and currency independently. In our case however we wanted currency to be linked specifically to the language/country (i.e. if the user is US it shows $). We therefore modified the code to automatically assign a currency when a language was set, either automatically when the user first arrives, or by changing language using the flags.
Now whilst these changes weren’t 5 minutes work by any means, they are certainly a world away from what would have been the case 5 years ago.
Are you looking for an eCommerce website? Call us on 01273 603995, or email us at firstname.lastname@example.org.