This is more of a post for me in case I ever need to do this again. I look after and have created a few Adobe Business Catalyst websites. This was back when they were a cool Aussie Startup called GoodBarry. Now they are part of the behemoth that is Adobe. I probably would not recommend Adobe Business Catalyst to many people now. Even though they now have the power and might of Adobe behind them, they not put out that many fixes this year, and there is a major bug in my site that they have said they will fix “in an upcoming release”. This is really not good enough. There are dozens of features that just don’t work well (eg the whole Email Marketing tool), and the whole system is feeling a bit tired and dated. I really really hope that Adobe does good things with it, and that the upcoming version 3 is great, but I don’t hold much hope.
So I have to add support for another country for one of the sites that I look after. Here is the list of things that I need to do in order to make the new country functioning. To see some great multi currency sites in Adobe BC head over to www.apresvelo.com, www.explanar.com or www.bollorethinpapers.com. I have borrowed some javascript hints from a few of these pages, plus I got some great help from the LinkedIn Group and from the BC Support team also.
Domains
- modify the Admin > Manage Domain Name setting to add the ‘A’ record for the sub domain for the new country, and choose the Start Page. I don’t make many changes for each country, and don’t have a separate start page for each country, but if you did need a different page for each country then you would set it here.
- Note: I’m not doing anything with language and translations, but look at the www.bollorethinpapers.com to see what can be achieved with translations. I have set up usa. and uk. as my sub domains.
Templates
- Modify the Default Template (Admin > Manage Site-Wide Templates) to include the JavaScript to change to the correct sub domain based on the users’ IP address which is converted to a country code using the {module_visitorcountrycode} tag. Note, that you can do this by using a manual drop down list, but I found that it was important for the affiliates page to have the right sub domain there, or the affiliate link went to the wrong sub domain, so I have decided that it is best to automate the sub domain setting based on IP address. Here is my JavaScript code:
<script language="javascript" type="text/javascript">
var country = '{module_visitorcountrycode}'; // e.g. var country = US;
var countryselected = document.getElementById("selectCountry")
var newurl;
var currenturl = document.location.hostname;
switch (country) {
case 'US': newurl = 'usa.mydomain.com'; break;
case '': newurl = 'uk.mydomain.com'; break;
default: newurl = 'www.mydomain.com'; break;
}
if(newurl != currenturl) {
document.location = 'http://' + newurl;
}
</script>
CSS
- The site has some products that are only sold in Australia, so with the help of the BC support team they came up with this suggestion. Add a custom code to the Australian only products, (using the Unit Type field – eg PR-AU) then hide those products from the international sites using some simple CSS. Modify the ModuleStylesheets.css to include the following code in the part of the CSS file where the other Shopping items are:
.USPR-AU {
display: none;
}
- To make this CSS work, wrap the contents of the Individual Product – Small in a Div with the following class description.
class="{module_visitorcountrycode}{tag_unittype}"
E-Commerce
- Add the pricing for the new currency – Go to Add Prices to this Product in each individual Product’s page.
- Set up any Tax Codes applicable to the new country.
- Add Shipping Options for the new country.
- Add Gift Vouchers for the new country (if you use them).
- Add your Payment Gateway for the new country (This site uses Paypal, so it’s just a matter of copying the details over from the existing country).
Online Shop Layouts
Go to Admin > More Customization Options > Online Shop Layouts. For the templates in Customize Check-Out Process Experience, each country has its own page layout. Copy the page from the existing country and modify it to suit the new country. See my examples below:
Shopping Cart
- One thing that really bugs me about online shopping is the assumption that most sites make about currency – they assume you know what currency you are buying in, and they assume that you will assume it’s USD. So, on the total line, I include the words “in Pounds (GBP)” or “in Australian Dollars (AUD)” or “in US Dollars (USD)” after the total.
- Ensure there is code to show the tax settings and shipping options for the new country. I don’t have gift vouchers, but if you do, ensure the code for Gift vouchers for the new country are here also.
Currency Exchange
- I have a simple currency exchange popup so I need to change the JavaScript that calls that. Here is my JavaScript function:
function newPopup() {
var sTotal=document.getElementById("invTotal").innerHTML;
sTotal = sTotal.replace("$","")
url = "http://www.google.com/finance/converter?a=" +sTotal+ "&from=AUD&to=GBP"
popupWindow = window.open(
url,'popUpWindow','height=150,width=400,left=10,top=10,resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,directories=no,status=no')
}
- The html code that calls this popup is a hyperlink after the Total in the local currency.,
<a href="JavaScript:newPopup()">Convert Currency</a>
Registration – Buy
- This site has a different set of “how did you hear about us” options for each country which is a custom field I have set up. I modify the Option Values for the drop down list on this layout.
- I also add the text after the amount to show what currency this transaction will be in.
- This site has some payment options that are only available in Australia (eg EFT), so I have some Javascript that disables that payment method if any other country is selected.
- This site only uses paypal, but if you have different payment gateway options for each country, or use Credit Card payments you modify them here.
Registration – Receipt
- This site does not have any different requirements but if you have any changes to make, so them here, but remember to copy over your standard receipt layout anyway.
- If you use Quotes, also modify the Registration – Quote and Receipt – Quote templates or Gift Voucher template if you use Gift Vouchers.
Web Pages
- This site does not have many changes for each country, but if you did need a different web page for each country then you would need to set them up, and set up a different start page for each country.
- I just use some JavaScript to change one div on my page depending on the country.
System Messages
- These are country specific also, so go through every message in Admin > More Customization Options > System Messages and copy your customised ones over to the new country. The only one this site had customised was the 404 Page Not Found.
System Emails
- Check your system emails to see if there is anything that needs to be specifically changed for the new country – go to Admin > More Customization Options > System Emails.
- Eg, again I had the text to show what currency this transaction was in on the Invoice. However as there is no separate Invoice for each country, and you can’t use JavaScript on emails, there is not really much that you can do with the invoice except make it very generic.
- If you use Quotes or Gift Vouchers, remember to check the text in the emails for each of these.
Testing
Once you have done all the customisations you need for your new country, you will need to test it – and test it as if you are a user that is coming from an IP address inside that country. To do this you will need a VPN. A VPN channels all the web traffic from your computer through a server in a specific country to provide the websites you are visiting, an IP address from that country – it effectively looks to the website you are visiting like you are really coming to the seite from that country.
- I have used Always VPN for a US VPN server previously and it is a great service and pay as you go. They unfortunately don’t have a server in the UK.
- I found TunnelBear that can switch between UK and US effortlessly and they have 500MB free per month – which should be plenty to test your website.
Just remember to turn off your VPN service when you have finished testing.
Well I hope this post helps if you ever have to set up another country in Business Catalyst. If you have any more ideas for cool things to do with multi-national sites, or any ways that I can improve my Javascript Code (I am not a coder, so it can probably do with some improvement) then please add a comment below.