Location: PHPKode > scripts > Shopping Cart - Shopping list application > shopping-cart-shopping-list-application/help.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
		<title>Shopping Help</title>
	</head>

	<body bgcolor="#bab9f8">
		<p align="center"><font size="5"><strong><em>Shopping Cart V0.9</em></strong></font></p>
		<p align="center"><font size="4"><em>Release date Jul 1st 2006</em></font></p>
		<p align="center">(C)&nbsp;2006 by <a href="mailto:hide@address.com">G.Glendown</a></p>
		<p align="center">Released under GPL</p>
		<ol>
			<li><a href="#intro">Introduction</a></li>
			<li><a href="#inst">Installation</a></li>
			<li>Usage</li>
		</ol>
		<ul>
			<ul>
				<li><a href="#editshop">Shops</a></li>
				<li><a href="#edititem">Items</a></li>
				<li><a href="#main">Using the main Shopping Cart&nbsp;List</a></li>
			</ul>
		</ul>
		<p></p>
		<hr width="90%" />
		<p><a name="intro"></a><strong><font size="4">1.&nbsp;Introduction</font></strong></p>
		<p>Shopping Cart is a small package of PHP&nbsp;scripts/pages to help you keep a list of groceries (or what ever) you need to pick up. You can create a set of shops (or types of shops) that you usually go to, and a set of things you frequently pick up. Every item can be assigned to a certain store (or any store), and you can display the list of items to get either in total, or limited to a certain store you just happen to be at.</p>
		<p>Shopping Cart was inspired by the Palm Pilot program&nbsp;&quot;<a href="http://www.land-j.com/jshop.html">JShopper</a>&quot;, which is a great little tool!</p>
		<p>Requirements to run&nbsp;Shopping Cart are pretty simple - a basic LAMP (or W*MP if you can't help it) system should do, with PHP&nbsp;and MySQL being the basic requirements. The scripts are small, and unless you create a really big amount of stores and items, storage requirements on the harddisk should also be rather limited. As for the system used to display the list, any current browser that can visualize HTML&nbsp;pages should be sufficient. JavaScript is used, but not required. The package has been tested on the Ixi OGO (actually, it was designed for it), other handheld devices should also work.</p>
		<p>As I had handheld devices in mind when designing the user interface, it's pretty slim as far as display information is concerned. A typical list page will be around 2-4k in size, small enough to work comfortably over GPRS&nbsp;connections. Apart from some colors and regular form elements, no graphical stuff was used at all.</p>
		<p>Shopping Cart is released under the GNU&nbsp;Public Licence. Do with it as you like, but if you decide to redistribute a new version, please at least keep my name &amp; references to the original program intact ;) Also, improvements and fixes are always welcome, just let me know ;)</p>
		<hr width="90%" />
		<p><a id="inst" name="inst"></a><font size="4"><strong>2. Installing</strong></font></p>
		<p>Installing Shopping Cart is pretty straightforward. Just drop all the files in a subdirectory on a webserver. You will need to create a database for it (or use an already existing one), e.g. like this:</p>
		<pre>    $ mysql_admin -p -uroot create shopping</pre>
		<p>Enter the appropriate password to create the database. You should also create a user for this database:</p>
		<pre>    $ mysql -p -uroot
    mysql&gt;&nbsp;grant insert, update, delete on shopping.*
           to hide@address.com identified by &quot;shoppw&quot;;</pre>
		<p>Once you have done this, get ahold of the file config.php and set the values for database server, database name, user and password accordingly. Then, import the database structure:</p>
		<pre>    $ mysql -pshoppw -ushop shopping &lt;shopping.sql</pre>
		<p>This will create the two tables used by Shopping Cart and adds an item and shop for testing. Both can be delete anytime.</p>
		<p>Now, direct your browser towards the directory, if the Webserver is configured to display a file called &quot;index.php&quot;, it should show the initial shopping list directly. If not, either update your webserver config, or add &quot;index.php&quot; to the URL.</p>
		<p>That's it, you're done!&nbsp;:)</p>
		<hr width="90%" />
		<p><a id="editshop" name="editshop"></a><font size="4"><strong>3. Usage</strong></font></p>
		<p><img src="pics/editshop.png" alt="" height="137" width="336" align="right" border="0" />To start off with, you will need to define a set of shops by calling the page <font face="Courier New, Courier, Monaco, monospace"><a href="editshop.php">editshop.php</a></font> from the server. It will give you a drop-down selection of all currently configured shops, as well as an entry line.</p>
		<p>Shopping Cart uses Java Script to update the data displayed - on JS-enabled browsers, anytime you select an item from the drop down list, or update a checkmark on the main list, the form is submitted to the webserver and the new information is displayed. This may not be available on your handheld device. In this case, after selecting an item from the drop down, you will need to select the &quot;Go&quot; button prior to any other modification - Shopping Cart will not update or delete an entry if the data displayed is not from the same entry as the one shown in the drop down list. This manual will assume that your browser has working JS ...</p>
		<p>To create a new shop, just enter its name in the &quot;Shop:&quot; line and select &quot;New&quot;. Similarly, to change the name of a shop, select it from the drop down, modify it and select&nbsp;&quot;Change&quot;. Items assigned to that shop will still remain assigned!</p>
		<p>To&nbsp;delete a shop entry, select it and press &quot;Del&quot; - any items assigned to the shop are not deleted, but set to &quot;any&quot;&nbsp;shop. You can then re-assign them to any other shop.</p>
		<p><a id="edititem" name="edititem"></a><font size="4"><strong>Editing Items</strong></font></p>
		<p><img src="pics/edititem.png" alt="" height="180" width="333" align="right" border="0" />To modify the list of items, handling is similar to the shop list. To create a new item, though, select&nbsp;&quot;New&quot; from the drop down list. This will clear the entry form so you can then enter a new item.</p>
		<p>Apart from the item name, you can assign a certain store. This will let you later on get a specific list for a certain store you are just in, hiding grocery items while you're shopping in the local sports store. If the item should be listed on multiple stores, just select&nbsp;&quot;any&quot; here (which is the default). The isle entry lets you sort the items - on the shopping list, items are first sorted by this field, then by their names. If you do not enter anything here, &quot;99&quot; is used as a default. Finally, you can optionally enter a price for an item, which will be shown on the main list. This can be used to enter the regular price, allowing you to shop for any specials, or see how &quot;special&quot; a special really is ... Once you're done, press &quot;Save&quot; to store the entry. Same goes for editing an entry, once you selected the item, do any changes and again use &quot;Save&quot; to update the database.</p>
		<p>Finally, to delete an item, select it and press&nbsp;&quot;Del&quot; - pretty much straight-forward ...</p>
		<p><a id="main" name="main"></a><font size="4"><strong>The main shopping list</strong></font></p>
		<p><img src="pics/main.png" alt="" height="358" width="334" align="right" border="0" />Once you have set up the Shopping Cart with all your favorite items and shops, you're ready to go! The main window has a few static entry items as well as the list of the shopping items. On the drop down list, you can either select all shops, not limiting the items displayed to a certain shop, or select a single shop. While &quot;all&quot; is unchecked, only items selected to be bought are being listed, with an empty checkmark in front of them. Once you check an item, it is removed from the display (again, if your browser does not implement JS, you will have to select &quot;Update&quot; at the bottom of the page to submit the changes). By selecting the &quot;all&quot;&nbsp;checkmark at the top, handling and displayed items will change, the logic of the checkmarks is reversed. This mode is for making your shopping list. Here's a table (hopefully) clarifying what items are displayed with which setting:</p>
		<div align="center">
			<table border="1" cellspacing="2" cellpadding="0">
				<tr>
					<th align="right" width="20%">Shop:</th>
					<th rowspan="2" valign="bottom">Single</th>
					<th rowspan="2" valign="bottom">All</th>
				</tr>
				<tr>
					<th align="left" width="20%">All:</th>
				</tr>
				<tr>
					<th align="left" width="20%">not checked</th>
					<td>anything selected for buying in this store as well as items to be bought not assigned to a specific store</td>
					<td>all items selected for buying<br />
							Items to be bought have a checkmark</td>
				</tr>
				<tr>
					<th align="left" width="20%">checked</th>
					<td>all items assigned to this specific store - items not assigned to a store are not shown</td>
					<td>all items<br />
							Items to be bought have a checkmark</td>
				</tr>
			</table>
			<p align="left">Now, anything not checked is not on your &quot;needed&quot; list, while checking an item defines it to be bought.</p>
			<p align="left"></p>
		</div>
	</body>

</html>
Return current item: Shopping Cart - Shopping list application