<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Atelier Studios &#187; Web Development</title>
	<atom:link href="http://www.atelier-studios.com/category/blog/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.atelier-studios.com</link>
	<description></description>
	<lastBuildDate>Fri, 11 May 2012 07:36:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>The Future of Touch in Doubt</title>
		<link>http://www.atelier-studios.com/blog/future-touching-doubt/</link>
		<comments>http://www.atelier-studios.com/blog/future-touching-doubt/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 22:24:47 +0000</pubDate>
		<dc:creator>dave.walker</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Touch]]></category>

		<guid isPermaLink="false">http://www.atelier-studios.com/?p=1433</guid>
		<description><![CDATA[There&#8217;s no doubt that touch is important, what&#8217;s more important from a developers standpoint is a standardised model for touch events. The W3C announced a Candidate Recommendation specification for Touch &#8230; <a href="http://www.atelier-studios.com/blog/future-touching-doubt/"><br />Read More <span class="meta-nav"></span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s no doubt that touch is important, what&#8217;s more important from a developers standpoint is a standardised model for touch events. The W3C announced a Candidate Recommendation specification for Touch Events in December 2011. Shortly after this announcement a patent was disclosed by Apple and a Patent Advisory Group (PAG) was formed. The W3C announced that they had stopped work on the specification until the PAG concludes.</p>
<p>Why is this bad? We&#8217;re heading towards a mobile web where the primary input is touch, to support this a standard needs to be in place. These standards are outlined by the W3C and adopted by everyone in the industry. If the W3C are unable to standardise Touch Events we’ll be stuck for years without a consistent event model across browsers and devices.</p>
<p>What can we do? Although the W3C is still planning to move forward with the Touch Events spec (pending a recommendation from the PAG), the future is unclear. We think that the Microsoft proposed pointer event model is easier to use and more future-proof. We can lobby with the W3C and Microsoft to draft a standards specification based on the IE10 pointer events model and hope for it be standardised.</p>
<p>For more information visit the <a href="http://blog.jquery.com/2012/04/10/getting-touchy-about-patents/" rel="nofollow"  target="_blank">jQuery Blog &gt; Getting Touchy About Patents</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atelier-studios.com/blog/future-touching-doubt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Goes Open Source</title>
		<link>http://www.atelier-studios.com/blog/asp-net-open-source/</link>
		<comments>http://www.atelier-studios.com/blog/asp-net-open-source/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 14:35:36 +0000</pubDate>
		<dc:creator>dave.walker</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.atelier-studios.com/?p=1406</guid>
		<description><![CDATA[Microsoft has embraced the Open Source community today by announcing the release of the ASP.NET Web API and ASP.NET Web Page source code under an open source licence (Apache 2.0). &#8230; <a href="http://www.atelier-studios.com/blog/asp-net-open-source/"><br />Read More <span class="meta-nav"></span></a>]]></description>
			<content:encoded><![CDATA[<p>Microsoft has embraced the Open Source community today by announcing the release of the ASP.NET Web API and ASP.NET Web Page source code under an open source licence (Apache 2.0).</p>
<p>The biggest part of this announcement is that Microsoft will be fully embracing the open source way by allowing any developer to submit patches and code contributions via their code repositories  hosted on CodePlex. Microsoft&#8217;s development team will review all submitted contributions for potential inclusion in the future products.</p>
<p>Microsoft hopes that this move will bring a more open development model where everyone in the community will be able to engage and provide feedback on code checkins, bug-fixes, new feature development, and build and test the products on a daily basis using the most up-to-date version of the source code.</p>
<p><a href="http://weblogs.asp.net/scottgu/archive/2012/03/27/asp-net-mvc-web-api-razor-and-open-source.aspx" rel="nofollow" >Read the rest of the article here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atelier-studios.com/blog/asp-net-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed issues with datatable copy feature</title>
		<link>http://www.atelier-studios.com/blog/speed-issues-datatable-copy-feature/</link>
		<comments>http://www.atelier-studios.com/blog/speed-issues-datatable-copy-feature/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 10:20:40 +0000</pubDate>
		<dc:creator>mark.onslow</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.atelier-studios.com/?p=1398</guid>
		<description><![CDATA[One of our biggest challenges with each website is speed optimisation. When presented with a site that is heavy on pages and I&#8217;m talking 600+ pages stored in a datatable, &#8230; <a href="http://www.atelier-studios.com/blog/speed-issues-datatable-copy-feature/"><br />Read More <span class="meta-nav"></span></a>]]></description>
			<content:encoded><![CDATA[<p>One of our biggest challenges with each website is speed optimisation.</p>
<p>When presented with a site that is heavy on pages and I&#8217;m talking 600+ pages stored in a datatable, things become a bit of an issue when interrogating the datatable for the page URL and its parent URLs.</p>
<p>Previously when getting data, we used to return a copy of the datatable so any code that modifies it will not modify the source, however, returning a copy is what occupied the CPU, especially a site which is traffic heavy.</p>
<p>With good ol Visual Basic profiler to the rescue we were able to see how much time the datatable copy function was taking up.<br />
See our sampling report below when requesting a copy of a datatable.</p>
<p><img class="alignnone size-full wp-image-1399" src="http://www.atelier-studios.com/wp-content/uploads/2012/03/ProfilerScreenShot01-e1332929116968.jpg" alt="" width="611" height="298" /></p>
<p>Since re-jigging our code, using less database and function calls, we&#8217;ve had a massive improvement in performance. As you can see from the below screen shot, the datatable copy function does not appear.</p>
<p><img class="alignnone size-full wp-image-1400" src="http://www.atelier-studios.com/wp-content/uploads/2012/03/ProfilerScreenShot02-e1332929194832.jpg" alt="" width="610" height="203" /></p>
<p>Looking at task manager on the server for this particular site:<br />
SQL server went from 80% CPU use down to 0-2%.<br />
IIS w3wp service went from 100% down to 0-69% peaks.<br />
Page load times went from 10-15 seconds down to 2-4 seconds.<br />
For a site this heavy in pages and functionality, we saw this as a result.</p>
<p>Speed optimisation doesn&#8217;t stop there however, we have more ideas in mind on making load times quicker and will be included in our CMS product going forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.atelier-studios.com/blog/speed-issues-datatable-copy-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.7 .animate() bug</title>
		<link>http://www.atelier-studios.com/blog/jquery-1-7-animate-bug/</link>
		<comments>http://www.atelier-studios.com/blog/jquery-1-7-animate-bug/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 11:03:43 +0000</pubDate>
		<dc:creator>ed.boyd</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.atelier-studios.com/?p=1390</guid>
		<description><![CDATA[Whilst developing a project the other day using the jQuery 1.7 library I stumbled upon a bug within the animate method. I was trying to animate the width of an &#8230; <a href="http://www.atelier-studios.com/blog/jquery-1-7-animate-bug/"><br />Read More <span class="meta-nav"></span></a>]]></description>
			<content:encoded><![CDATA[<p>Whilst developing a project the other day using the jQuery 1.7 library I stumbled upon a bug within the animate method.</p>
<p>I was trying to animate the width of an element from 0 to a given percentage to create a delightful sliding effect to show the completion percentage of a task. However my percentage width kept being changed to a pixel based width no matter what I did&#8230;..&#8217;strange&#8217; I thought. After a bit of research and some testing on jsfiddle I discovered that this was a known bug with the 1.7 library which prevents precentage widths in the animate method.</p>
<p>I was forced against my will to revert to an older version of jQuery until a new release was made which fixed this issue. Luckily on the eve of November 3rd 2011 a new version was released which saw an end to this monstrosity&#8230;.. Panic over!</p>
<p><a href="http://bugs.jquery.com/ticket/10669" rel="nofollow" >http://bugs.jquery.com/ticket/10669</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atelier-studios.com/blog/jquery-1-7-animate-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Location Location Location</title>
		<link>http://www.atelier-studios.com/blog/location-location-location/</link>
		<comments>http://www.atelier-studios.com/blog/location-location-location/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 17:15:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[GPS]]></category>

		<guid isPermaLink="false">http://www.atelier-studios.com/?p=663</guid>
		<description><![CDATA[This came about following a recent requirement to implement Google driving directions into one of our client&#8217;s mobile sites. A feature I wanted to add was to to make use &#8230; <a href="http://www.atelier-studios.com/blog/location-location-location/"><br />Read More <span class="meta-nav"></span></a>]]></description>
			<content:encoded><![CDATA[<p><img style="border: 1px solid black; padding: 10px; float: left; margin: 0 10px 10px 0;" title="red-funnel" src="http://www.atelier-studios.com/wp-content/uploads/2010/12/red-funnel-216x300.jpg" alt="red-funnel" width="216" height="300" />This came about following a recent requirement to implement Google driving directions into one of our client&#8217;s mobile sites. A feature I wanted to add was to to make use of the on-board GPS to provide a starting point if the device supported it.</p>
<p>One issue I experienced whilst developing the GPS functionality was how to reliably test it. The problem was how to test the GPS without borrowing our designer&#8217;s iPhone every five minutes. I knew Firefox supported the new w3c standard for geolocation. However, in my Firefox at least, Google appeared to have stopped serving the location details, which meant for all intents and purposes, the geolocation was broken.</p>
<p>Luckily, Firefox allows you to change the location service provider via the <strong>about:config geo.wifi.uri settings</strong>. This means that as long as the address you enter returns a JSON string, your location will be valid. A quick Google returns a number of addresses that will do this for you. One which is particularly interesting: <a href="https://www.dephormation.org.uk/geolocation/iamthepresident.php" rel="nofollow"  target="_blank">https://www.dephormation.org.uk/geolocation/iamthepresident.php</a></p>
<p>For the purposes of testing I threw together a quick mash up that will take any location name/postcode and return the JSON string for Firefox to respond to geolocation requests.</p>
<p><img style="float: right; margin: 0 0 10px 10px;" title="gowalla" src="http://www.atelier-studios.com/wp-content/uploads/2010/12/gowalla-258x300.jpg" alt="gowalla" width="258" height="300" />This got me thinking about the various location-based web games and some searching online turned up a number of sites which had a mobile version that utilises the w3c standard. Cue Gowalla and Foursquare. I was able to fool them in to thinking I was at the White House. Give it ago.</p>
<p>Obviously that&#8217;s one use for it. However, the real use I had was for testing our new Google Maps driving directions GPS integration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.atelier-studios.com/blog/location-location-location/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The New Windows Phone 7</title>
		<link>http://www.atelier-studios.com/blog/the-new-windows-phone-7/</link>
		<comments>http://www.atelier-studios.com/blog/the-new-windows-phone-7/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 13:42:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.atelier-studios.com/?p=655</guid>
		<description><![CDATA[As a self-proclaimed Microsoft evangelist, I&#8217;ve enjoyed working with Microsoft products ever since the DOS 6.2 days. It must come as no surprise then that I&#8217;m looking forward to Microsoft&#8217;s &#8230; <a href="http://www.atelier-studios.com/blog/the-new-windows-phone-7/"><br />Read More <span class="meta-nav"></span></a>]]></description>
			<content:encoded><![CDATA[<p><img style="float: left; margin: 0 10px 10px 0;" title="Windows Phone7" src="http://www.atelier-studios.com/wp-content/uploads/2010/12/IMAG0097.jpg" alt="IMAG0097" width="200" height="345" />As a self-proclaimed Microsoft evangelist, I&#8217;ve enjoyed working with Microsoft products ever since the DOS 6.2 days. It must come as no surprise then that I&#8217;m looking forward to Microsoft&#8217;s new Windows Phone 7. The new phones have been in shops since the start of November and for the past year I&#8217;ve been making do with my original Windows Mobile phone, suffice to say I can&#8217;t wait to upgrade.</p>
<p>The launch of a new platform poses an obvious question for an agency like Atelier &#8211; when is the right time to jump? By that I mean, when should we start  dedicating resources and building experiences for the new devices. At Atelier we always assess whether it&#8217;s something we want to be there at the start of, or if we&#8217;d rather invest later after a solid user base has been established. There are valid reasons and risks involved with both. Should we invest early with the risk that the platform fizzles out with little market share (hello Palm Pre)? Or do we wait until there&#8217;s already a huge following (hello iPhone)?</p>
<p>Either way, it&#8217;s an interesting time for mobile development. There are already two very big players in the market who are growing by the day &#8211; Android is positively thriving and we needn’t mention the iPhone. But I for one hope that there is room for a third option in the form of Windows Phone 7. It&#8217;s a good time for Microsoft and they have the freedom to reinvent their mobile platform after they dropped the ball with Windows Mobile some 3 years ago.</p>
<p>Microsoft has a trump card when it comes to developers too. The tools you use for writing for the platform, such as C#, XNA &amp; Silverlight, are ones we&#8217;re already used to. I&#8217;m willing to bet that if you gave a Windows developer the freedom to choose between Android, iPhone or Windows Phone 7 they would choose the platform they have some familiarity with. Coupled with this is the fact that Microsoft has made it clear that they&#8217;re 100% behind it.</p>
<p>We&#8217;re looking at ways to bring some of our experiences to the new Windows Phone 7 platform. For example, we&#8217;re excited about some of the possibilities with location-based services. Microsoft has demonstrated that there&#8217;s a market for these type of games and applications, having released &#8216;Kingdoms&#8217;, a tie-in with the Xbox 360 game, &#8216;Fable 3&#8242;. The mobile version sees you claiming virtual landmarks in exchange for currency in the main &#8216;Fable 3&#8242; game. Whilst this isn&#8217;t available on the Windows Phone 7 just yet, it demonstrates just some of the possibilities.</p>
<p>At Atelier Studios we&#8217;re no strangers to mobile development, having developed a number of mobile sites and iPhone applications, and we&#8217;re excited about the possibilities of developing for the new Windows Phone 7 platform too. We always like to hear about new ideas, whether that be for mobiles or the web &#8211; if you&#8217;ve got one, please do get in touch!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.atelier-studios.com/blog/the-new-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>International Delivery on Google Checkout</title>
		<link>http://www.atelier-studios.com/blog/international-delivery-on-google-checkout/</link>
		<comments>http://www.atelier-studios.com/blog/international-delivery-on-google-checkout/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 11:25:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.atelier-studios.com/?p=555</guid>
		<description><![CDATA[Now I think Google are great, but sometimes I wish they explained things in a more usable format. They are trying to cater for the masses through some very comprehensive &#8230; <a href="http://www.atelier-studios.com/blog/international-delivery-on-google-checkout/"><br />Read More <span class="meta-nav"></span></a>]]></description>
			<content:encoded><![CDATA[<p>Now I think Google are great, but sometimes I wish they explained things in a more usable format. They are trying to cater for the masses through some very comprehensive administration areas, but to do anything out of the norm can be complex. It doesn’t have to be that way does it? How come so many of their “help” features are so outdated and inaccurate <em>(a whole different blog article in the making!)</em>?<span id="more-698"></span></p>
<p>Now, unfortunately Google seem to be spending 99.99999999% of their time in improving and enhancing current and new products and the remaining 0.00000001% providing minimum support on anything they currently have running. Don’t get me wrong, what they have up and running is awesome, but not so good when something goes wrong or you need to do something slightly differently from the masses.</p>
<p><strong>The Scenario</strong></p>
<p>So let me tell you the scenario – I have a client using PayPal Buy Now buttons (I wouldn’t normally even consider this route, but it’s a short term fix while their proper e-Commerce system is being developed). They have amazing products and a result in a period of 8 days got over 600 worldwide orders – amazing considering no promotional work had been done!</p>
<p>Suddenly PayPal, in their wisdom, decided to withhold payment. Normally, every 3 or 4 days you draw down payments from PayPal. PayPal made the assumption that the orders were fraudulent. They had absolutely nothing to back this up.</p>
<p>The company is reputable and established. The products are great, built well and are what they say they are. All the orders were genuine and checked. Due to the volume of orders (which is good for PayPay as they get their cut) PayPal simply made the decision that there had to be something dodgy going on – which there wasn’t.  So in their infinite wisdom, they simply stated that they would hold onto all money for 120 days – absolutely crazy.</p>
<p>So, while the lawyers battle it out, it was my task to find a very quick alternative.</p>
<p><strong>The Initial Solution</strong></p>
<p>I made the decision to go with Google Checkout as it was simplest short term solution and the most realistic to get implemented within the few hours I had – well at the time this is what I thought.</p>
<p>So, the Google Checkout account was set up and I merrily added all the Buy Now buttons to all the product pages – coded, uploaded and working.</p>
<p>The first problem I encountered was that the simplicity of Buy Now buttons meant unless it was coded on the page (which is simple enough to do) the user couldn’t order more than one product, or multiple quantities of the product</p>
<p>The solution here was to revert to the Google Shopping Cart – coded, uploaded and working.</p>
<p>The second problem was that by default Google (in their infinite wisdom) only allow orders to be delivered to the default country of the Google Merchant account owner , in this case, good old blighty. Dam I thought, well that’s useless, for my client anyway, where 90% of their orders come from outside of the UK!</p>
<p>In a moment of complete insanity I wondered whether choosing Google Checkout was the right option. PayPal wasn’t an option (because they are clearly stupid – stick to eBay transactions – it’s what you know best), WorldPay (I don’t think so – thanks RBS) and the majority of other options had  either ridiculously expensive transactions fees or required a fully scripted cart (bespoke or off the shelf) to implement.</p>
<p>I searched and searched for a solution. Google’s help was useless, and didn’t explain clearly enough what needed to be done. They also have conflicting advice on what should be such a simple solutions. I emailed Google support – now I know they are busy, but they take too long to respond and you simple get sent links to the useless articles. I get the impression that they are so busy that they simply don’t have time to read your emails, and make a response based upon the subject alone.</p>
<p>The solution though was very simple.</p>
<p>Firstly, implement the Google Buy Now buttons or the Google Checkout using their instructions. These instructions are actually correct!</p>
<p>I ended up using Google Checkout, so I’ll base my explanation on this.</p>
<p>I added the Google code to the footer of my page (just above the Google Analytics code in this case – yes they are taking over the world). The “mid” refers to the Merchant ID code, so the XXXXXXXXXXXXXXX&#8217; should be replaced with your merchant code.</p>
<p>Change the currency if need be, change the weight unit if need be, and post-cart-to-sandbox should be true to use the Sandbox (testing) environment, flash if you are going live.</p>
<p>&lt;script  id=&#8217;googlecart-script&#8217; type=&#8217;text/javascript&#8217; src=&#8217;https://checkout.google.com/seller/gsc/v2_2/cart.js?mid=XXXXXXXXXXXXXXX&#8217; integration=&#8217;jscart-wizard&#8217; post-cart-to-sandbox=&#8217;false&#8217; currency=&#8217;GBP&#8217; productWeightUnits=&#8217;KG&#8217;&gt;&lt;/script&gt;</p>
<p>I used the tool at <a href="https://checkout.google.com/sell" rel="nofollow" >https://checkout.google.com/sell</a> to generate the button code for each product page – easy as pie. Pasted the code into my page and off I went.</p>
<p>Now for the clever but (which isn’t actually that clever, but if would be useful for Google to tell you in a simple way!):</p>
<p>You would have pasted in your button code, something like this:</p>
<p>&lt;div&gt;<br />
&lt;input value=&#8221;PRODUCT NAME IN HERE &#8220;&gt;<br />
&lt;select&gt;<br />
&lt;option selected=&#8221;selected&#8221;&gt;CHOOSE YOUR COLOUR:&lt;/option&gt;<br />
&lt;option value=&#8221;Muted&#8221;&gt;RED&lt;/option&gt;<br />
&lt;option value=&#8221;Bright&#8221;&gt; BLUE&lt;/option&gt;<br />
&lt;/select&gt;<br />
&lt;input value=&#8221;9.99&#8243; type=&#8221;hidden&#8221;&gt;<br />
&lt;div title=&#8221;Add to cart&#8221; role=&#8221;button&#8221; tabindex=&#8221;0&#8243; Add to Cart&lt;/div&gt;<br />
&lt;/div&gt;</p>
<p>Incidentally I tweaked the code generated by the Google tool to add in:</p>
<p>&lt;option selected=&#8221;selected&#8221;&gt;CHOOSE YOUR COLOUR:&lt;/option&gt;</p>
<p>So that the user knew what options they wanted to choose and I removed the default  =&#8221;selected&#8221; from the first product option which Google puts in all on its own – how clever of it(!), and added in the “CHOOSE YOUR COLOUR:” option.</p>
<p>Also, I wanted to make the “Add to Cart” button a bit more fancy so added some inline styles (naughty but time was against me).</p>
<p><strong>International Delivery</strong></p>
<p>Next was solving the international delivery problem. This solution was simply, but the way Google explains it makes is incredible overly complex.</p>
<p>Underneath the closing div for the div called product, add in this code:</p>
<p>&lt;form&gt;<br />
&lt;input value=&#8221;NAME OF THE DELIVERY METHOS&#8221;/&gt;<br />
&lt;input value=&#8221;1.99&#8243;/&gt;<br />
&lt;input value=&#8221;GBP&#8221;/&gt;<br />
&lt;input name=&#8221;checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.shipping-restrictions.allowed-areas.world-area-1&#8243; value=&#8221;true&#8221;/&gt;<br />
&lt;/form&gt;</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;http://checkout.google.com/seller/gsc/v2_2/cart.js?mid=XXXXXXXXXXXXXXX&#8221; currency=&#8221;GBP&#8221; post-cart-to-sandbox=&#8221;false&#8221;&gt;&lt;/script&gt;</p>
<p>Change the values of the following to the correct values:</p>
<p>ship_method_name_1 – Name of Shipping Method<br />
ship_method_price_1 – Price of Shipping Method<br />
ship_method_currency_1 – Currency</p>
<p>Copy the code, changing 1 to 2 etc for additional flat rate shipping methods.</p>
<p>The important bit in the above is “world-area-1” – simply turns on the ability to ship internationally!</p>
<p>To implement alternative shipping methods, an explanation is here:</p>
<p><a href="http://www.paycircuit.com/gc_cookbook.aspx" rel="nofollow" >http://www.paycircuit.com/gc_cookbook.aspx</a></p>
<p>This guy is great – he knows more than Google!</p>
<p>So this sorted out the international delivery option, but no, it want over.</p>
<p><strong>Shipping based upon the Cart Sub Total</strong></p>
<p>I didn’t want to use flat rate shipping.  I wanted the shipping price to be defined based upon the value of the shopping cart – something I thought would be relatively simply. I set up my pricing matrix using the settings with the Google Checkout merchant’s area, but no joy. The coding on my page was overwriting these settings. Dam…. If it’s not one thing it’s another!</p>
<p>After some hefty searching I found a better solution.</p>
<p>Using the Google Checkout JavaScript API, you can calculate the shipping on the page, sent the calculations to Google Checkout and bobs your uncle!</p>
<p>I needed to tweak what I did earlier. I was aware in the future that my client would change delivery prices based upon weight which I needed to consider, so this is what I did:</p>
<p>On all pages containing products I added the following JavaScript into the &lt;head&gt; tag:</p>
<p>&lt;script&gt;<br />
function googlecartOnCheckoutClick() {<br />
var orderweight = 0;<br />
var subtot = googlecart.getSubtotal();<br />
var items = googlecart.getItems();<br />
for (var i = 0; i &lt; items.length; i++) {<br />
if (!items[i].isMarkedForRemoval()) {<br />
orderweight += items[i].getWeight() * items[i].getQuantity();<br />
}<br />
}<br />
var ship = document.getElementById(&#8220;royal_mail&#8221;);<br />
if (subtot &lt;= 9.99 ) {<br />
ship.value = 1.99;<br />
}<br />
else if(subtot &lt;= 49.99){<br />
ship.value = 4.99;<br />
} else {<br />
ship.value = 9.99;<br />
}<br />
return true;<br />
}<br />
&lt;/script&gt;</p>
<p>The above code is pretty simply. All I did was set the order weight to 0 as I didn’t want to use this for the time being, then define an if/else statement for the different values as follows:</p>
<p>if (subtot &lt;= 9.99 ) {<br />
ship.value = 1.99;<br />
}</p>
<p>If the order sub total is £9.99 or less, the delivery price should be £1.99.</p>
<p>else if(subtot &lt;= 49.99){<br />
ship.value = 4.99;<br />
}</p>
<p>If the order sub total is £49.99 or less, the delivery price should be £4.99.</p>
<p>else {<br />
ship.value = 9.99;<br />
}</p>
<p>Otherwise make the delivery price £9.99 – i.e. if it’s more than £49.99.</p>
<p>So this code was added to the header.</p>
<p>All I needed to do now was to add the following code to the product code. I added it below the definition of the price, so:</p>
<p>&lt;input value=&#8221;24.99&#8243; class=&#8221;product-price&#8221;&gt;</p>
<p>Became:</p>
<p>&lt;input value=&#8221;24.99&#8243; class=&#8221;product-price&#8221;&gt;<br />
&lt;input value=&#8221;1&#8243; type=&#8221;hidden&#8221; /&gt;</p>
<p>Then what I wanted to do was to use my JavaScript function which I added in the head to overwrite the deliver price in my product code. You will notice in the JavaScript code “document.getElementById(&#8220;royal_mail&#8221;);”. This is in essence the ID that we will be using to replace with our correct delivery price.</p>
<p>So to have something to reference:</p>
<p>&lt;input type=&#8221;hidden&#8221; value=&#8221;1.99&#8243;/&gt;</p>
<p>Became:</p>
<p>&lt;input name=&#8221;ship_method_price_1&#8243; value=&#8221;1.99&#8243;/&gt;</p>
<p>i.e. I simply added.</p>
<p>Code, upload, test – and that’s it.</p>
<p>I hope this helps someone somewhere!</p>
<p><strong>By Matt Conrad</strong></p>
<p>Twitter: <a href="http://www.twitter.com/radleey" rel="nofollow" title="Follow me on Twitter"  target="_blank">radleey</a><br />
Linked In: <a href="http://uk.linkedin.com/in/radleey" rel="nofollow"  target="_blank">radleey</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atelier-studios.com/blog/international-delivery-on-google-checkout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

