<?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>ReloadedPC Ashland, Ohio &#187; wfcart</title>
	<atom:link href="http://www.reloadedpc.com/tag/wfcart/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reloadedpc.com</link>
	<description>Small Business Website Development</description>
	<lastBuildDate>Tue, 24 Jan 2012 18:36:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>CodeIgniter Shopping Cart Library</title>
		<link>http://www.reloadedpc.com/code-igniter/codeigniter-shopping-cart-library/</link>
		<comments>http://www.reloadedpc.com/code-igniter/codeigniter-shopping-cart-library/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 18:22:20 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Code Igniter]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[shopping cart]]></category>
		<category><![CDATA[wfcart]]></category>

		<guid isPermaLink="false">http://www.reloadedpc.com/?p=44</guid>
		<description><![CDATA[CodeIgniter is a great PHP framework to work with. One of the items several developers have been asking to be included in the next CodeIgniter release, is a core library for a shopping cart. The library is being added for CI version 1.7.2, and is currently available via SVN on the CodeIgniter website. UPDATE 09/12/2009: [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codeigniter.com">CodeIgniter</a> is a great PHP framework to work with. One of the items several <a rel="attachment wp-att-41" href="http://www.reloadedpc.com/code-igniter/open-flash-chart-2-codeigniter-2/attachment/ci_logo_flame/"><img class="alignright size-full wp-image-41" title="CodeIgniter Logo" src="http://www.reloadedpc.com/wp-content/uploads/2009/07/ci_logo_flame.jpg" alt="CodeIgniter Shopping Cart Library ci logo flame " width="150" height="164" /></a>developers have been asking to be included in the next CodeIgniter release, is a core library for a shopping cart. <span style="text-decoration: line-through;">The library is being added for CI version 1.7.2, and is currently available via <a href="http://dev.ellislab.com/svn/CodeIgniter/trunk">SVN on the CodeIgniter</a> website.</span></p>
<p><strong>UPDATE 09/12/2009: </strong>The shopping cart library has now been released as part of the Code Igniter stable release version 1.7.2. You can dowload it at  <a href="http://codeigniter.com/downloads/">CodeIgniter.com</a></p>
<p><span id="more-44"></span></p>
<p>I have used <a href="http://www.webforcecart.com/">wfCart</a> class in another CI project I worked on. It provides simple functionality: add, edit, delete products along with displaying the shopping cart contents. wfCart took a little hacking of the code and adding the CI object to the code in order to use some the builtin features of CI. It worked well, but lacked the naming conventions that make CI so great.</p>
<p>I decided to give the Cart library a try, so I put together some simple code to see the functionality of the Cart class. Posted below is download of files you can drop into your CodeIgniter application, and try it out for yourself.</p>
<p>I created a new controller and named it Cart.php.</p>
<p>The code in the controller offers simple functionality:</p>
<ul>
<li>View products</li>
<li>View shopping cart</li>
<li>Update shopping cart quantities</li>
<li>Delete products from shopping cart</li>
</ul>
<p>You will need a table to your database to store the product information.</p>
<p>[code]<br />
CREATE TABLE IF NOT EXISTS `product` (<br />
`product_id` int(10) NOT NULL AUTO_INCREMENT,<br />
`product_sku` varchar(100) NOT NULL,<br />
`product_description` varchar(200) NOT NULL,<br />
`product_family` varchar(250) NOT NULL,<br />
`product_quantity` double(10,4) NOT NULL,<br />
`product_price` double(10,2) NOT NULL,<br />
`vendor_id` int(10) NOT NULL,<br />
`user_id` int(10) NOT NULL,<br />
PRIMARY KEY (`product_id`),<br />
UNIQUE KEY `product_id` (`product_id`)<br />
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ;[/code]</p>
<p>Just add a couple products to the table, and you should be able to test this out.</p>
<p><a rel="attachment wp-att-59" href="http://www.reloadedpc.com/code-igniter/codeigniter-shopping-cart-library/attachment/cart/">Download Demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reloadedpc.com/code-igniter/codeigniter-shopping-cart-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 10/18 queries in 0.008 seconds using disk: basic
Object Caching 350/391 objects using disk: basic

Served from: www.reloadedpc.com @ 2012-02-05 04:19:02 -->
