<?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>The Wojo Group &#187; simpleCart(js)</title>
	<atom:link href="http://www.thewojogroup.com/category/simplecartjs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thewojogroup.com</link>
	<description>The musings of a small creative media company.</description>
	<lastBuildDate>Tue, 11 May 2010 00:10:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>simpleCart(js) Version 2.0 Released!</title>
		<link>http://www.thewojogroup.com/2009/08/simplecartjs-version-2-0-released/</link>
		<comments>http://www.thewojogroup.com/2009/08/simplecartjs-version-2-0-released/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 12:28:30 +0000</pubDate>
		<dc:creator>Brett Wejrowski</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[simpleCart(js)]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[google checkout]]></category>
		<category><![CDATA[javascript shopping cart]]></category>
		<category><![CDATA[simple cart]]></category>
		<category><![CDATA[simpleCart]]></category>
		<category><![CDATA[version 2]]></category>

		<guid isPermaLink="false">http://www.thewojogroup.com/?p=567</guid>
		<description><![CDATA[We are happy to announce the release of simpleCart(js) version 2.0 today.  We have been working hard to add several features that you all have requested, and we're excited to get this script in your hands.  There are several new features, including GoogleCheckout, easy currency settings, tax, shipping, and a new method for adding items to your cart that <strong>requires no javascript</strong>, and allows for different inputs and options. There is also a brand new site to go along with this update: <a href="http://simplecartjs.com">simplecartjs.com </a>.  Please take a minute to check out all the new features, documentation, and demo.  Thanks to all those who have been helping test for the past few weeks, we couldn't have released this new version without your help. ]]></description>
			<content:encoded><![CDATA[<p>We are happy to announce the release of simpleCart(js) version 2.0 today.  We have been working hard to add several features that you all have requested, and we&#8217;re excited to get this script in your hands.  There are several new features, including GoogleCheckout, easy currency settings, tax, shipping, and a new method for adding items to your cart that <strong>requires no javascript</strong>, and allows for different inputs and options. There is also a brand new site to go along with this update: <a href="http://simplecartjs.com">simplecartjs.com </a>.  Please take a minute to check out all the new features, documentation, and demo.  Thanks to all those who have been helping test for the past few weeks, we couldn&#8217;t have released this new version without your help.</p>
<h3>Upgrading your version</h3>
<p>If you are already using simpleCart(js), the only thing you need to change to use the new script is how you add it to your page:</p>
<pre name="code" class="html">

&lt;script src=&quot;simpleCart.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt;
simpleCart.email = &quot;you@yours.com&quot;;
&lt;/script&gt;
</pre>
<p>Check out the website, <a href="http://simplecartjs.com">simplecartjs.com</a> to learn about the new features, and let us know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewojogroup.com/2009/08/simplecartjs-version-2-0-released/feed/</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
		<item>
		<title>Javascript Number.toCurrency()</title>
		<link>http://www.thewojogroup.com/2009/07/javascript-number-to-currency/</link>
		<comments>http://www.thewojogroup.com/2009/07/javascript-number-to-currency/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 18:56:33 +0000</pubDate>
		<dc:creator>Brett Wejrowski</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[simpleCart(js)]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[price formatting]]></category>

		<guid isPermaLink="false">http://www.thewojogroup.com/?p=542</guid>
		<description><![CDATA[While working on <a title="simpleCart(js) repo" href="http://github.com/thewojogroup/simplecart-js/tree/master" target="_blank">simpleCart(js) 2.0</a> and a few shopping carts for clients, I found myself writing several helper functions for formatting strings and numbers.  One of the most useful helpers was a toCurrency() method for numbers.]]></description>
			<content:encoded><![CDATA[<p>While working on <a title="simpleCart(js) repo" href="http://github.com/thewojogroup/simplecart-js/tree/master" target="_blank">simpleCart(js) 2.0</a> and a few shopping carts for clients, I found myself writing several helper functions for formatting strings and numbers.  One of the most useful helpers was a toCurrency() method for numbers:</p>
<pre name="code" class="javascript">

var myNumber = 8.3;

alert( myNumber.toCurrency() );   //alerts &quot;$8.30&quot;

myNumber = 119427.23529;

alert( myNumber.toCurrency() );    //alerts &quot;$119,427.24&quot;

myNumber = 1231;

alert( myNumber.toCurrency( &quot;€&quot; ) );   //alerts &quot;€1,231.00&quot;
</pre>
<p>The dollar sign is default, but you can replace it with any symbol in the function call.</p>
<p>Just copy this code to your js file and enjoy! (This code also implements a reverse() method for strings that you might find useful.)</p>
<pre name="code" class="javascript">

String.prototype.reverse=function(){
return this.split(&quot;&quot;).reverse().join(&quot;&quot;);
}
Number.prototype.withCommas=function(){
var x=6,y=parseFloat(this).toFixed(2).toString().reverse();
while(x&lt;y.length){y=y.substring(0,x)+&quot;,&quot;+y.substring(x);x+=4;}
return y.reverse();
}
Number.prototype.toCurrency=function(){
return(arguments[0]?arguments[0]:&quot;$&quot;)+this.withCommas();
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.thewojogroup.com/2009/07/javascript-number-to-currency/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
