<?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"
	>

<channel>
	<title>Club osCommerce</title>
	<atom:link href="http://www.clubosc.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.clubosc.com</link>
	<description>Showcasing osCommerce - the good, the bad and the ugly!</description>
	<pubDate>Wed, 23 Jul 2008 09:17:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Deconstructing an osCommerce Shipping Module</title>
		<link>http://www.clubosc.com/deconstructing-an-oscommerce-shipping-module.html</link>
		<comments>http://www.clubosc.com/deconstructing-an-oscommerce-shipping-module.html#comments</comments>
		<pubDate>Wed, 23 Jul 2008 09:17:46 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=172</guid>
		<description><![CDATA[Shipping is just about the easiest thing to learn to code in osCommerce - what I am going to do in this post is deconstruct a shipping module so that you learn a little bit about how it works...
The module we are looking at is /includes/modules/shipping/flat.php - starting from the bottom I will attempt to [...]]]></description>
			<content:encoded><![CDATA[<p>Shipping is just about the easiest thing to learn to code in osCommerce - what I am going to do in this post is deconstruct a shipping module so that you learn a little bit about how it works...</p>
<p>The module we are looking at is /includes/modules/shipping/flat.php - starting from the bottom I will attempt to explain each "function".</p>
<div class="igBar"><span id="lphp-10"><a href="#" onclick="javascript:showPlainTxt('php-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> keys<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This function returns some values from the database.  These values are determined by the "install" function.</p>
<div class="igBar"><span id="lphp-11"><a href="#" onclick="javascript:showPlainTxt('php-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-11">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> remove<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This function removes (which is why it is called "remove"!) values from the database when you uninstall the module from within your admin section.</p>
<div class="igBar"><span id="lphp-12"><a href="#" onclick="javascript:showPlainTxt('php-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-12">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> install<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This function, guess what, install values to the database when you install the module from within your admin section.</p>
<div class="igBar"><span id="lphp-13"><a href="#" onclick="javascript:showPlainTxt('php-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-13">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> check<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This function checks the values in the database that are linked to the module.</p>
<div class="igBar"><span id="lphp-14"><a href="#" onclick="javascript:showPlainTxt('php-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-14">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> quote<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$method</span> = <span style="color:#FF0000;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This function outputs a shipping quotation to the checkout_shipping.php page if the module is installed.</p>
<div class="igBar"><span id="lphp-15"><a href="#" onclick="javascript:showPlainTxt('php-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-15">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> flat<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This is the main "parent" function that controls all the other functions and passes information to those functions.</p>
<div class="igBar"><span id="lphp-16"><a href="#" onclick="javascript:showPlainTxt('php-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-16">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">class</span> flat </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The overall class, which allows us to use the above functions logically.</p>
<blockquote><p>Classes are nothing more than a collection of variables and functions acting on those variables. They provide a means of thinking about things in real world terms. In other words they describe an object. An object, or instance, of a class is an actual "living, breathing" structure of that class. Let's say we want to describe a bicycle. A proper class of a bicycle might have the variables $pedals, $chain, $front wheel, $rear wheel, $brakes, and $handle_bars. Functions of the bicycle would include Stop(), Accelerate(), Coast(), TurnLeft() and TurnRight(). You can think of your script as the entity operating that bike. The function Accelerate() could be passed an argument such as $Braking_Force and use that information along with the defined instance variables (probably $brakes and $wheels) and output some result back to your script.<br /><em>For more reading on classes, click <a href="http://www.phpbuilder.com/columns/rod19990601.php3" target="_blank">here</a> (external link to phpbuilder.com).</em></p></blockquote>
<p><b>Changing Text in Shipping Modules</b></p>
<p>Some things that are in UPPER CASE, like this MODULE_SHIPPING_FLAT_TEXT_TITLE is a defined piece of language...which means that it can be changed in the linked language file - NOT in the actual shipping module.  The language files are found within the languages structure - for "flat.php", the language file is at;<br />
/includes/languages/english/modules/shipping/flat.php - simply change the wording to reflect what you want on the page.  If you wanted to change the description from "best way" to "1 set cost for all products", you would change this:</p>
<div class="igBar"><span id="lphp-17"><a href="#" onclick="javascript:showPlainTxt('php-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-17">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'MODULE_SHIPPING_FLAT_TEXT_WAY'</span>, <span style="color:#FF0000;">'Best Way'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>to this:</p>
<div class="igBar"><span id="lphp-18"><a href="#" onclick="javascript:showPlainTxt('php-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-18">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'MODULE_SHIPPING_FLAT_TEXT_WAY'</span>, <span style="color:#FF0000;">'1 set cost for all products'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Other things that are in UPPER CASE are found in the database - it was added when we installed the Module using the "install" function.  These are controlled from within your Admin section.</p>
<p>I hope that this short blog post was useful - in the future I will create a shipping module from scratch and show you how it's done.  If anyone has an idea for a shipping module, please comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/deconstructing-an-oscommerce-shipping-module.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>YOUR oscommerce site on YOUR home computer</title>
		<link>http://www.clubosc.com/your-oscommerce-site-on-your-home-computer.html</link>
		<comments>http://www.clubosc.com/your-oscommerce-site-on-your-home-computer.html#comments</comments>
		<pubDate>Wed, 16 Jul 2008 15:19:58 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=169</guid>
		<description><![CDATA[I'm now offering a new service whereby I "mirror" your live oscommerce site onto your own home computer.
There are many reasons why you would want to do this, one of the most important being the fact that you will always have a backup should any of your live files become corrupted.  You also will be [...]]]></description>
			<content:encoded><![CDATA[<p>I'm now offering a new service whereby I "mirror" your live oscommerce site onto your own home computer.</p>
<p>There are many reasons why you would want to do this, one of the most important being the fact that you will always have a backup should any of your live files become corrupted.  You also will be able to test new contributions, make design changes etc on your "mirror" site before transferring the changes to your live site.</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-170" title="localhost" src="http://www.clubosc.com/wp-content/uploads/2008/07/localhost.gif" alt="" width="280" height="259" /></p>
<p>They say an image is worth 1000 words, so there you go.  I take your live site, and transfer it into a system which can be used on your own home computer.  There is no link between the "live site" and the "mirror site" - so you are safe to make whatever changes you wish on the "mirror site" - once happy, you can then transfer your changes to "live".  Easy as 123.</p>
<p>The cost of this service is £15.00, payable by Paypal.  The service is for Windows PC users only - and Mac users who can run a windows emulator.</p>
<p>If you are interested, and I don't see why you would not be, please get in touch, my email address is up there ^</p>
<p>Every osCommerce user, and I really do mean EVERY osCommerce user should have their site mirrored in case of emergency.  And now, this service can make it happen, easily, quickly and without fuss.  If the cost is too much, get in touch anyway, as I have another option that you might like to know about!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/your-oscommerce-site-on-your-home-computer.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Recording IP address in osCommerce</title>
		<link>http://www.clubosc.com/recording-ip-address-in-oscommerce.html</link>
		<comments>http://www.clubosc.com/recording-ip-address-in-oscommerce.html#comments</comments>
		<pubDate>Mon, 14 Jul 2008 15:02:37 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=168</guid>
		<description><![CDATA[Alan asks;
Is it possible to record the ip address of each sale?
Alan, yes it is.  But it is not standard osCommerce procedure to do so.  
Adding an IP address recorder is really easy and is a simple modification that amnyone, and I mean ANYONE can make.  There is a couple of IP [...]]]></description>
			<content:encoded><![CDATA[<p>Alan asks;</p>
<blockquote><p>Is it possible to record the ip address of each sale?</p></blockquote>
<p>Alan, yes it is.  But it is not standard osCommerce procedure to do so.  </p>
<p>Adding an IP address recorder is really easy and is a simple modification that amnyone, and I mean ANYONE can make.  There is a couple of IP contributions available already, but I thought it would make a decent tutorial for anyone wanting to get a bit "technical" with osCommerce.</p>
<p>The three files that we will be amending are;</p>
<ul>
<li>checkout_process.php</li>
<li>admin/orders.php</li>
<li>admin/includes/languages/english/orders.php</li>
</ul>
<p>and we will be amending the orders table in the database to record the IP address.</p>
<p><b>Step 1:  checkout_process.php</b></p>
<p>This file does the grunt work of recording orders made, so we need to add 1 line of code as so;</p>
<p>Find:</p>
<div class="igBar"><span id="lphp-29"><a href="#" onclick="javascript:showPlainTxt('php-29'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-29">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'currency_value'</span> =&gt; <span style="color:#0000FF;">$order</span>-&gt;<span style="color:#006600;">info</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'currency_value'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Change to:</p>
<div class="igBar"><span id="lphp-30"><a href="#" onclick="javascript:showPlainTxt('php-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-30">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'currency_value'</span> =&gt; <span style="color:#0000FF;">$order</span>-&gt;<span style="color:#006600;">info</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'currency_value'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'ip_address'</span> =&gt; tep_get_ip_address<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><b>Step 2:  admin/orders.php</b></p>
<p>This files shows the orders made, we need to add a few pieces of code to this file.</p>
<p>Find:</p>
<div class="igBar"><span id="lphp-31"><a href="#" onclick="javascript:showPlainTxt('php-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-31">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;td <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"dataTableHeadingContent"</span> align=<span style="color:#FF0000;">"center"</span>&gt;&lt;?php <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> TABLE_HEADING_DATE_PURCHASED; ?&gt;&lt;/td&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Add this line of code directly underneath it:</p>
<div class="igBar"><span id="lphp-32"><a href="#" onclick="javascript:showPlainTxt('php-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-32">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;td <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"dataTableHeadingContent"</span> align=<span style="color:#FF0000;">"center"</span>&gt;&lt;?php <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> TABLE_HEADING_IP_ADDRESS; ?&gt;&lt;/td&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Find:</p>
<div class="igBar"><span id="lphp-33"><a href="#" onclick="javascript:showPlainTxt('php-33'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-33">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$orders_query_raw</span> = <span style="color:#FF0000;">"select o.orders_id ............ </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Change to:</p>
<div class="igBar"><span id="lphp-34"><a href="#" onclick="javascript:showPlainTxt('php-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-34">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$orders_query_raw</span> = <span style="color:#FF0000;">"select o.ip_address, o.orders_id ........... </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This is repeated another two times.</p>
<p>Find:</p>
<div class="igBar"><span id="lphp-35"><a href="#" onclick="javascript:showPlainTxt('php-35'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-35">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;td <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"dataTableContent"</span> align=<span style="color:#FF0000;">"center"</span>&gt;&lt;?php <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> tep_datetime_short<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$orders</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'date_purchased'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; ?&gt;&lt;/td&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Add this line of code directly underneath it:</p>
<div class="igBar"><span id="lphp-36"><a href="#" onclick="javascript:showPlainTxt('php-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-36">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;td <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"dataTableContent"</span> align=<span style="color:#FF0000;">"center"</span>&gt;&lt;?php <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$orders</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'ip_address'</span><span style="color:#006600; font-weight:bold;">&#93;</span>; ?&gt;&lt;/td&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><b>Step 3:  admin/includes/languages/english/orders.php</b></p>
<p>Simply add this piece of code:</p>
<div class="igBar"><span id="lphp-37"><a href="#" onclick="javascript:showPlainTxt('php-37'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-37">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'TABLE_HEADING_IP_ADDRESS'</span>, <span style="color:#FF0000;">'IP Address'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><b>Step 4:  Database changes</b></p>
<p>Run this SQL file to amend your database to allow it to record the IP address;</p>
<div class="igBar"><span id="lphp-38"><a href="#" onclick="javascript:showPlainTxt('php-38'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-38">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ALTER TABLE `orders` ADD `ip_address` VARCHAR<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#CC66CC;color:#800000;">20</span> <span style="color:#006600; font-weight:bold;">&#41;</span> NOT <span style="color:#000000; font-weight:bold;">NULL</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That is it.  If you have correctly made the changes, the buyers IP address will be recorded and will show in the order summary screen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/recording-ip-address-in-oscommerce.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Gift Wrapping in osCommerce</title>
		<link>http://www.clubosc.com/gift-wrapping-in-oscommerce.html</link>
		<comments>http://www.clubosc.com/gift-wrapping-in-oscommerce.html#comments</comments>
		<pubDate>Sat, 12 Jul 2008 13:59:55 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Reader Questions]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=167</guid>
		<description><![CDATA[Chris writes;
I was thinking that it would be great if you make a constribution that It will add a checkbox on the checkout about a giftwrap. Also under this option it would be good a textbox so the customer can leave a message to be in the card outside of the giftwrap.. you can make [...]]]></description>
			<content:encoded><![CDATA[<p>Chris writes;</p>
<blockquote><p>I was thinking that it would be great if you make a constribution that It will add a checkbox on the checkout about a giftwrap. Also under this option it would be good a textbox so the customer can leave a message to be in the card outside of the giftwrap.. you can make the constribution to work with extra cost or free.. At this time there is one too old constribution about giftwrap but it is too bad made..</p></blockquote>
<p>The old contribution that Chris is referring to is <a href="http://www.oscommerce.com/community/contributions,1155">this one</a> - having looked at it, I can see that it's a real dogs dinner of coding.  No wonder there is a need for a new, cleaner version!</p>
<p>My idea would be to create a new, lean and mean order_total module which you can set up in Admin and insert a price (maybe a fixed price or a percent of order sub-total price).  Somewhere in the checkout procedure have a checkbox that asks if you would like to "gift wrap" the order which triggers the module.  I believe it is pointless to have a comments box attached to this, as there is already a very usable comments box on each checkout page!</p>
<blockquote><p>Also it is old the constribution I am talking about and it doesn’t work correctly with the languages.. So it would be good if you make a new one for RC2..</p></blockquote>
<p>With my idea there would be only 1 language file (per language) so it would be easy to set up...</p>
<blockquote><p>I like the way you make the constributions because you don’t affect to many files from the standard oscommerce files.. </p></blockquote>
<p>Thank you - that's the whole idea of my contributions - pack as much as possible into the smallest codebase and try not to amend base files very much.  As an example, in the existing giftwrap contribution there is a whole class file!  What on earth for?  Does not make any sense at all.  </p>
<p>I believe that with my idea for the codebase, I can make 1 order_total module, it's language file, and then a couple of small code additions in the checkout pages.  Job done - install time on a shop would be a maximum of 5 minutes.</p>
<p>So, this leads me to getting someone to pay for my time to make it.  If anyone is interested to do so, I suspect that I can get this coded up for $50 (if you are willing to donate the code back to the osCommerce project) or $100 (if you want the code all to yourself).  Should anyone be interested enough, please email me, my email address is up there ^</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/gift-wrapping-in-oscommerce.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Donate The Change to Charity - osCommerce</title>
		<link>http://www.clubosc.com/donate-the-change.html</link>
		<comments>http://www.clubosc.com/donate-the-change.html#comments</comments>
		<pubDate>Fri, 11 Jul 2008 09:46:48 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Contributions]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=166</guid>
		<description><![CDATA[A new contribution which allows your buyer to "round up" his order to the next nearest whole dollar/euro/pound etc.  So instead of paying say $96.32, they can "round up" to $97.00 - and you, the shop owner would then do whatever you want (donate to charity I'd assume!) with the extra 0.68.
Only tested on [...]]]></description>
			<content:encoded><![CDATA[<p>A new contribution which allows your buyer to "round up" his order to the next nearest whole dollar/euro/pound etc.  So instead of paying say $96.32, they can "round up" to $97.00 - and you, the shop owner would then do whatever you want (donate to charity I'd assume!) with the extra 0.68.</p>
<p>Only tested on one live shop and on my localhost test shop - but works well.  Future updates will include a way to totalise the "round ups" somewhere in the Admin section.</p>
<blockquote><p>This contribution was sponsored by <a href="http://www.furryfamilysupplies.com/">Furry Family Supplies</a> - thank you very much Lindsay!</p></blockquote>
<p>At this moment, rounded up figures can be seen on each individual order, as it has been coded as an order_total module.</p>
<p>Installation is easy, download the zip from <a href="http://addons.oscommerce.com/info/6073">here</a> to your desktop, unzip it and you will find some txt files and some php files.  Upload the php files to the correct places!  Any txt files have code which needs to be added to the existing php files of the same name.  Once installed, turn it on in your Admin section (order total modules) remembering to give it a unique sorting id.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/donate-the-change.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Sponsor needed - Shipping Date in osCommerce</title>
		<link>http://www.clubosc.com/sponsor-needed-shipping-date-in-oscommerce.html</link>
		<comments>http://www.clubosc.com/sponsor-needed-shipping-date-in-oscommerce.html#comments</comments>
		<pubDate>Thu, 10 Jul 2008 10:44:00 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Contributions]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=165</guid>
		<description><![CDATA[All - I recently made a shipping date modification for a client, you can see it in action on this video (You Tube).
It basically adds a shipping date for the customer to choose when their order should be delivered.  The store owner can set any date range (eg, start 2 days from order date, [...]]]></description>
			<content:encoded><![CDATA[<p>All - I recently made a shipping date modification for a client, you can see it in action on <a href="http://www.youtube.com/watch?v=4VJurAmjIcE">this video</a> (You Tube).</p>
<p>It basically adds a shipping date for the customer to choose when their order should be delivered.  The store owner can set any date range (eg, start 2 days from order date, 1 day from order date, until 2 weeks into the future, a month in the future, turn off weekends etc).  The date gets recorded as part of the order and can be seen in Admin and in the customers account when he/she logs in.  It works pretty well!</p>
<p>Someone contacted me about it as they needed such a modification - I contacted my customer to ask if I could re-use the code I made for them and my customer said "yes".  Since then I have not heard from the person who contacted me wanting it, which is a bit annoying to say the least.  </p>
<p>So, if anyone needs such a modification, I can spend some time to go through my customers files to make a usable contribution - however, to do this, I need a sponsor who is willing to pay me for my time.  Once I've sanitised the files, I'll upload it to the contributions area of osCommerce, and your name/url will be listed as the sponsor of the work.</p>
<p>If you are willing to sponsor an hour of my time, throw me an email, my email address is up there ^</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/sponsor-needed-shipping-date-in-oscommerce.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Hot 100 Update - we have 100!</title>
		<link>http://www.clubosc.com/hot-100-update-we-have-100.html</link>
		<comments>http://www.clubosc.com/hot-100-update-we-have-100.html#comments</comments>
		<pubDate>Thu, 10 Jul 2008 07:38:17 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Style]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=164</guid>
		<description><![CDATA[I haven't made a Hot 100 blog post for a while, so now is the time, particularly as we surpassed 100 extraordinary osCommerce sites!  The other day I added a few more sites which brought the total to 101 - now I have to work out a way to only show the Top 100...
My [...]]]></description>
			<content:encoded><![CDATA[<p>I haven't made a Hot 100 blog post for a while, so now is the time, particularly as we surpassed 100 extraordinary osCommerce sites!  The other day I added a few more sites which brought the total to 101 - now I have to work out a way to only show the Top 100...</p>
<p>My idea is to show maybe 110 or so, with the bottom 10 being in a "sandbox" - these will be votable into the Top 100.  Each time I then add a new site, the site at the bottom of the "sandbox" will be bumped.  I think that should work well.</p>
<p><b>Current Standings</b></p>
<p><a href="http://www.iloveono.com/">ONO Tea</a> (6.3/10 with 61 votes cast)<br />
<a href="http://www.terrenobili.com/">Prodotti tipici e vini piemontesi</a> (5.5/10 with 563 votes cast)<br />
<a href="http://www.decoracasa.ch/">Mobili e arredamento - decoracasa.ch</a> (4.8/10 with 363 votes cast)<br />
<a href="http://www.lojamac.com/">LojaMac.com</a> (4.6/10 with 218 votes cast)<br />
<a href="http://www.texeresilk.com/">TexereSilk Online Store</a> (4.2/10 with 545 votes cast)</p>
<p><b>My personal favourite</b></p>
<p>My favourite at this point lies at #6 and is <a href="http://www.holtevinlager.dk/shop">Holte Vinlager</a> - there are some exceptional features on this store - check out the custom bottle builder feature.  Whoever built it, well done!</p>
<p><b>Deleting Sites from the list</b></p>
<p>I've also had to delete a couple stores due to persistent vote rigging - I really don't know why people do this.  It's sad.</p>
<p><b>Users adding stores to the list</b></p>
<p>Many thanks to those of you who have added stores for inclusion on the list - I've added lots of stores by your recommendations.  However, people (usually the store owner) are adding stores that are;</p>
<p>~ not osCommerce<br />
~ standard install of osCommerce</p>
<p>Please don't bother - I delete them as these show nothing exceptional about osC.  Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/hot-100-update-we-have-100.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Category Links in Main Page &#038; Jagged Pictures</title>
		<link>http://www.clubosc.com/category-links-in-main-page-jagged-pictures.html</link>
		<comments>http://www.clubosc.com/category-links-in-main-page-jagged-pictures.html#comments</comments>
		<pubDate>Wed, 09 Jul 2008 12:16:48 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Reader Questions]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=163</guid>
		<description><![CDATA[Suf writes;
How can I create category links with pictures in the main section of the home page?  The category links are currently in the left column with no pictures.  That is fine for other pages in the cart, but the home page should have the categories in main section.
This contribution should do it.
Most [...]]]></description>
			<content:encoded><![CDATA[<p>Suf writes;</p>
<blockquote><p>How can I create category links with pictures in the main section of the home page?  The category links are currently in the left column with no pictures.  That is fine for other pages in the cart, but the home page should have the categories in main section.</p></blockquote>
<p>This <a href="http://www.oscommerce.com/community/contributions,236">contribution</a> should do it.</p>
<blockquote><p>Most of the product pictures are very bad unless they are clicked on and enlarged.  After reading some posts on your blog, I think this is because we don't have the correct thumbnail versions of the pictures.</p></blockquote>
<p>That is the exact reason - osCommerce just compacts the large image using width and height attributes - making them look awful when small thumbnail.  </p>
<blockquote><p>  I downloaded your Club osCommerce Easy Thumbnail contribution, but I am not sure if I can use it because our shopping cart is not unmodified.  Can I still use it?</p></blockquote>
<p>You can use the <a href="http://addons.oscommerce.com/info/5777">large/small image mod</a> I made, you would need to incorporate the code changes into your own files - the best way to do this is to use a program called "Beyond Compare".  I also offer an install service should that be of help - it doesn't matter how much you've changed your files, I'll make it fit - email me if you need me to give you a price for this.</p>
<p>Good luck! Gary</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/category-links-in-main-page-jagged-pictures.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Boo Hoo Hoo</title>
		<link>http://www.clubosc.com/boo-hoo-hoo.html</link>
		<comments>http://www.clubosc.com/boo-hoo-hoo.html#comments</comments>
		<pubDate>Wed, 09 Jul 2008 07:22:01 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Reader Questions]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/?p=162</guid>
		<description><![CDATA[Note that this was a comment from "Jason" who didn't have the balls to leave a real email address - anonymity is the sort of BS that I hate.  So, as I cannot answer him by email...
Jason writes;
When are you going to have the WORKING version available to OSC users for free. Basically your [...]]]></description>
			<content:encoded><![CDATA[<p>Note that this was a comment from "Jason" who didn't have the balls to leave a real email address - anonymity is the sort of BS that I hate.  So, as I cannot answer him by email...</p>
<p>Jason writes;</p>
<blockquote><p>When are you going to have the WORKING version available to OSC users for free. Basically your original contribution you uploaded to OSC dosen't work properly (tax calculation) and now your asking people to pay for a working version??? The reason people use OSC is besacuse it's free!!! No one wants to pay for an install!!!! I didn't think this was the purpose of "Open Source"???</p></blockquote>
<p>No Jason, you just didn't think.  GPL has zero to do with cost.  You might like to read the GPL website, particularly this page:  http://www.gnu.org/philosophy/selling.html</p>
<p>The version uploaded is the version that I wrote for MY needs.  After loads of people moaned, I made a new version which includes tax calculations.  Unfortunately the tax calculation was slightly out, so needed recoding (for certain osCommerce set ups) - it's only this week that it seems to work for most, repeat MOST stores.</p>
<p>Now, if every module and code released was perfect, there would be NO osCommerce - everything is a work in progress.  Obviously that's something you have not thought about.</p>
<blockquote><p>It's pretty frustrating to people who spend time installing this, trying to figure out how to get the taxes configured correctly, then learning you want $50 to install a version that works. If you would just upload the "WORKING" version with or without instructions I bet we could figure out how to install it. Speaking of that, who are these people that had problems installing this??? When was it available on OSC???</p></blockquote>
<p>What's frustrating is people like you - supposedly running a professional business - who cannot accept that I also am running a business.  Are you going to give away all the products on your osCommerce website for free?  No, I thought not.  So, what's the difference with me asking for a contribution towards my cost and time?</p>
<p>Once I am completely happy with the codebase, I will release it on the osCommerce website - until then you wait.  Or you pay for an install.  Or, you take the open source code that is already available, go to a coder who will make the code changes you need and then you can donate the working code to the project.  Or you can just make anonymous comments and act like a troll <img src='http://www.clubosc.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/boo-hoo-hoo.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Printable List Of Products &#038; Thumbnails</title>
		<link>http://www.clubosc.com/printable-list-of-products-thumbnails.html</link>
		<comments>http://www.clubosc.com/printable-list-of-products-thumbnails.html#comments</comments>
		<pubDate>Mon, 07 Jul 2008 11:05:52 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.clubosc.com/printable-list-of-products-thumbnails.html</guid>
		<description><![CDATA[Anna asks;
I have on my website over 500 lines &#038; growing, &#038; I was wondering if there is anywhere in oscommerce I can produce (print out) a products list for people that haven't got access to a computer that wants to order from a catalogue. I really don't want to do this manually as it [...]]]></description>
			<content:encoded><![CDATA[<p>Anna asks;</p>
<blockquote><p>I have on my website over 500 lines &#038; growing, &#038; I was wondering if there is anywhere in oscommerce I can produce (print out) a products list for people that haven't got access to a computer that wants to order from a catalogue. I really don't want to do this manually as it would take for ever.</p></blockquote>
<p>There are a few contributions that already exist which you can use to make this, here's one I found;</p>
<p><a href="http://www.oscommerce.com/community/contributions,815">Add a Printable Catalog</a></p>
<p>There's probably lots more - have a search.</p>
<blockquote><p>Also how do I get rid of "click to enlarge" as my products don't appear larger if it is clicked on.</p></blockquote>
<p>The best way is to give each of your images a small and large size.  The small size would be used almost everywhere in osCommerce (aka thumb nail) and the large size would be used in the pop-up from the product page.  I've written about this previously (<a href="http://www.clubosc.com/horrible-or-awesome-2-thumbnail-images.html">link</a>) and suggest that my own small/large image modification (<a href="http://addons.oscommerce.com/info/5777">link</a>) is the easiest solution to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clubosc.com/printable-list-of-products-thumbnails.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
