<?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>multimixer &#187; osCommerce RC2a</title>
	<atom:link href="http://multimixer.gr/tag/oscommerce-rc2a/feed/" rel="self" type="application/rss+xml" />
	<link>http://multimixer.gr</link>
	<description>lets talk about osCommerce</description>
	<lastBuildDate>Fri, 19 Nov 2021 08:23:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Prepare for osCommerce. All you need to know before you start</title>
		<link>http://multimixer.gr/27/11/2010/prepare-for-oscommerce/</link>
		<comments>http://multimixer.gr/27/11/2010/prepare-for-oscommerce/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 06:59:19 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[osCommerce RC2a]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=472</guid>
		<description><![CDATA[You decided to use osCommerce. That's great, because osCommerce is one of the best ecommerce systems available. How to start? Let's take everything from the very beginning]]></description>
			<content:encoded><![CDATA[<p>You decided to use osCommerce. That&#8217;s great, because osCommerce is one of the best ecommerce systems available. How to start? Where to start? Let&#8217;s take everything from the very beginning</p>
<p>First of all you will need a domain name and a hosting account. There are various providers that do this, it&#8217;s up to you to choose one of them.</p>
<h3>First things to make clear:</h3>
<blockquote>
<ol>
<li>It&#8217;s absolutely indifferent for osCommerce what domain name you&#8217;ll use. It can be www.mystore.com or www.kuku.com.</li>
<li>osCommerce doesn&#8217;t require any special hosting plan. You don&#8217;t need to buy any of the &#8220;e-commerce ready&#8221; type of hosting plans like many hosting companies offer.</li>
<li>You don&#8217;t need to sign up for any merchant account with yahoo, google etc. You don&#8217;t need to sign up anywhere</li>
<li>osCommerce is free software. There are no fees to pay to anyone. There are also no &#8220;free gifts&#8221; to get from anyone</li>
</ol>
</blockquote>
<p>osCommerce is a standalone shopping cart program (you can say e-commerce program) that has very few hosting requirements to run smoothly. It be installed on any PHP enabled web server that can connect to a MySQL database. In other words, make sure your hosting plan include at least one database</p>
<h3>Your osCommerce hosting plan should include</h3>
<blockquote>
<ul>
<li>PHP 5+</li>
<li>MySQL 5+</li>
<li>cPanel access</li>
<li>phpMyAdmin access</li>
</ul>
</blockquote>
<p>To say the truth there are very few, if any, hosts that do not offer this fot a couple of euros per month. The above describe a simple, common hosting plan.  So, please, don&#8217;t get on somebody&#8217;s hook who will try to sell you any &#8220;e-commerce ready&#8221; or &#8220;osCommerce optimized&#8221;  hosting for more money</p>
<p>In case you ask about my personal preference, I can only say that I&#8217;m very satisfied with the host I use now. You can <a href="http://goo.gl/JV0Kv" target="_blank">take a look</a> if you are interested, in case you want to start with them I would say that a basic &#8220;<a href="http://goo.gl/JV0Kv" target="_blank">business package</a>&#8221; is all you need for your start. Later on, depending on your traffic, the number of products you have etc, you can upgrade to an other plan anytime. Feel free to <a href="http://multimixer.gr/contact/">get in touch</a> in case you are not sure about what kind of hosting you need</p>
<h3>Avoid &#8220;installers&#8221;</h3>
<p>One more thing of importance: Avoid any of the &#8220;one click&#8221; installation programs like &#8220;fantastico&#8221; or others. It can be that your host, or the one who offers the installation script does not offer the latest version of osCommerce. Also, you will miss a big part of the necessary understanding about how things work, and you will find your self asking questions like &#8220;where is the catalog&#8221; or &#8220;how can I go live&#8221; and such</p>
<h3>Use the original</h3>
<p>Don&#8217;t download osCommerce from anywhere else but from the <a class="wp-caption" title="Download osCommerce" href="http://www.oscommerce.com/solutions/downloads" target="_blank">official osCommerce website</a>. You will see there 2 available versions: osCommerce Online Merchant v2.3.1 and osCommerce Online Merchant v3.0 Alpha 5. Take the first one, version 2.3.1. It may give the impression that version 3 is the latest but it is not. Version 3 is in &#8220;alpha&#8221; stage, that means it is still under development and not ready for production. <strong>Version2.3.1 is the latest stable version and this is the one you should use</strong></p>
<p>I wish you a good start with osCommerce. In the next article I&#8217;ll explain how to install osCommerce easily. If you have any questions feel free to ask, or post a comment</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/27/11/2010/prepare-for-oscommerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add customers phone and email to the order confirmation email</title>
		<link>http://multimixer.gr/26/11/2010/add-customers-phone-and-email-to-the-order-confirmation-email/</link>
		<comments>http://multimixer.gr/26/11/2010/add-customers-phone-and-email-to-the-order-confirmation-email/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 15:32:54 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[osCommerce RC2a]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=425</guid>
		<description><![CDATA[The order confirmation email contains all kind of information except customers phone and email. Want to have customers phone and email in there too? It's really easy to do and won't cost you more than 2 minutes]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-large wp-image-437" title="order confirmation" src="http://multimixer.gr/wp-content/uploads/2010/11/handshake-525x350.jpg" alt="order confirmation" width="525" height="350" /></p>
<p>The order confirmation email contains all kind of information except customers phone and email. What if you need to contact your customer? The only way to do this in osCommerce is, to go to the administration panel, search for the customer and retrieve the information from there.</p>
<p>Why do have it that complicated? Why not to have the information right in the email? Let&#8217;s add phone and email into the order confirmation mail, it&#8217;s a simple 2 step and straightforward task.</p>
<p>We know that the mail is getting generated in file catalog/checkout_process.php. The lines we need to edit in this file are in the &#8220;// lets start with the email confirmation&#8221; section. It all depends where in the mail we want the information to appear, lets say we need it to be under the &#8220;billing address&#8221;.</p>
<p>In this case we go to the lines</p>
<pre class="brush:php; first-line:272">  $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                  EMAIL_SEPARATOR . "\n" .
                  tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";</pre>
<p>Directly after hat we add</p>
<pre class="brush:php; first-line:275">// BOF Multimixer 26 11 10
  $email_order .= EMAIL_TEXT_CUSTOMER_TELEPHONE . ' ' . $order-&gt;customer['telephone'] . "\n";
  $email_order .= EMAIL_TEXT_CUSTOMER_MAIL . ' ' . $order-&gt;customer['email_address']. "\n\n";
// EOF Multimixer 26 11 10</pre>
<p>Basically we are done. Only thing we need to do now, is to add 2 more language definitions for the words &#8220;email&#8221; and &#8220;phone&#8221;. In file catalog/includes/languages/english/checkout_process.php add before the last ?&gt;</p>
<pre class="brush:php">// BOF Multimixer 26 11 10
define('EMAIL_TEXT_CUSTOMER_TELEPHONE', 'Telephone:');
define('EMAIL_TEXT_CUSTOMER_MAIL', 'email:');
// EOF Multimixer 26 11 10</pre>
<p>Thats it ! Enjoy :)</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/26/11/2010/add-customers-phone-and-email-to-the-order-confirmation-email/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Adding a quantity input field to the product information page</title>
		<link>http://multimixer.gr/17/11/2010/add-a-quantity-input-field-to-your-product-info-page/</link>
		<comments>http://multimixer.gr/17/11/2010/add-a-quantity-input-field-to-your-product-info-page/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 06:19:24 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[osCommerce RC2a]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=98</guid>
		<description><![CDATA[Do you want your customers to add any quantity to their cart right on the product information page? Read this. A detailed article on how to add a quantity input field to your product information page in osCommerce.]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">We know all the famous &#8220;add to cart&#8221; button on the product information page. In version 2.3.1 it&#8217;s basically the same thing, the only difference is that, instead of the odd image we have a nice(r) jquery button.</p>
<p style="text-align: center;"><img class="size-full wp-image-154    aligncenter" title="add to cart button in osCommerce RC2a" src="http://multimixer.gr/wp-content/uploads/2010/10/add_cart_rc2a1-e1290599435477.jpg" alt="add to cart button in osCommerce RC2a" width="220" height="220" /><img class="size-full wp-image-162   aligncenter" title="add to cart button in osCommerce v2.3.1" src="http://multimixer.gr/wp-content/uploads/2010/10/add_cart_v23.jpg" alt="add to cart button in osCommerce v2.3.1" width="220" height="220" /></p>
<p style="text-align: left;">As a side note, let&#8217;s mention that,  for all people who believe that it is not necessary to have a script generating the buttons and who would prefer to use pure css buttons instead, I will post the way to do it soon. Same if you want to replace the image buttons.</p>
<p style="text-align: left;">Back to the topic, the button work fine, pressing it the customer gets one item added to the cart. To order eg 10 pieces, he need&#8217;s to go to his shopping cart, enter the desired quantity, click &#8220;update&#8221; and proceed to checkout. That&#8217;s also not bad if your store sell it&#8217;s items one by one usually.</p>
<p style="text-align: left;">What is if your store sell&#8217;s it&#8217;s items usually in larger quantities? Let&#8217;s say a customer what to buy 5 items as follows:</p>
<blockquote class="test">
<ul>
<li>A: 5pcs</li>
<li>B: 8 pcs</li>
<li>C: 3pcs</li>
<li>D: 21 pcs</li>
</ul>
</blockquote>
<p style="text-align: left;">He need either to repeat the procedure of going to the cart, entering the desired quantity, pressing &#8220;update&#8221;, continue shopping, or to keep a list to change the quantities after all items are in the cart. In the first case he&#8217;ll forget maybe to add something to the cart, in the second case he&#8217;ll maybe forget to update something or he&#8217;ll think it over and order a lower quantity. All of this is not good for your store, not to mention all the unnecessary &#8220;clicks&#8221; that do not add any joy to the shopping experience.</p>
<p style="text-align: left;">What we need to do, is to add a quantity input field to the product information page of your osCommerce store, so  that customers can enter the desired quantity right away</p>
<p style="text-align: left;">To do this, we need first to know how the &#8220;add to cart&#8221; button work on that page. The following post refer to version RC2a of osCommerce, things are not very different in v2.3.1</p>
<p style="text-align: left;">Going to file  <span style="color: #ff0000;">catalog/product_info.php</span> we see that the file is in real a &#8220;POST&#8221;  form, and the &#8220;add to cart&#8221; button it&#8217;s submit button. On this we need to work.</p>
<p style="text-align: left;">Here is the part of the file we&#8217;re interested in</p>
<pre class="brush:php; first-line: 213">&lt;?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?&gt;</pre>
<p style="text-align: left;">In version 2.3.1 the line number is 194 and look like this</p>
<pre class="brush:php; first-line: 194">    &lt;span class="buttonAction"&gt;&lt;?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?&gt;&lt;/span&gt;</pre>
<p style="text-align: left;">In your file this will be placed in &lt;td&gt;&lt;/td&gt; or into &lt;div&gt;&lt;/div&gt; or similar. It can also be that in your file the number is a bit different, so please to not stick on it, and search for the code little more up or down in your file. However, we see that there is no word about any quantity, the only thing that get submitted is the product ID. We know that the quantity added to the cart is always 1. Going to file <span style="color: #ff0000;"> </span><span style="color: #ff0000;">catalog/includes/application_top.php</span> we also understand why.</p>
<p style="text-align: left;">Here is the line we&#8217;re interested in:</p>
<pre class="brush:php; first-line: 360">      case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) &amp;&amp; is_numeric($HTTP_POST_VARS['products_id'])) {
                                $cart-&gt;add_cart($HTTP_POST_VARS['products_id'], $cart-&gt;get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
                              }</pre>
<p style="text-align: left;">In version 2.3.1 the line number is 333 and look a bit different</p>
<pre class="brush:php; first-line: 333">     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) &amp;&amp; is_numeric($HTTP_POST_VARS['products_id'])) {
                                $attributes = isset($HTTP_POST_VARS['id']) ? $HTTP_POST_VARS['id'] : '';
                                $cart-&gt;add_cart($HTTP_POST_VARS['products_id'], $cart-&gt;get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);
                              }</pre>
<p style="text-align: left;">We see that number 1 is added to whatever amount exist already in the cart. It&#8217;s a &#8220;+1&#8243; by default</p>
<p style="text-align: left;">Now that we know this 2 facts, we also know exactly what we have to do:</p>
<ol>
<blockquote>
<li>add one more field to the product information form. We want that field to be an input  field, so that customers can type in whatever they want</li>
<li>Change application top to add to the cart whatever got posted on the product page and not number 1 by default</li>
</blockquote>
</ol>
<p style="text-align: left;">First in file <span style="color: #ff0000;"> </span><span style="color: #ff0000;">catalog/product_info.php</span> we add in front of the submit button the quantity input field. We know that in osCommerce there is the predefined function <span style="color: #000000;">tep_draw_input_field</span> that do exactly what we want: To make an input field.</p>
<p style="text-align: left;">Finally the  line looks now like this for version 2.2 of osCommerce</p>
<pre class="brush:php; first-line: 213">&lt;?php echo TEXT_ENTER_QUANTITY . ' ' . tep_draw_input_field('cart_quantity', '1', 'size="5"') . ' ' . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?&gt;</pre>
<p style="text-align: left;">For the latest osCommerce version (2.3.1), the line look like this:</p>
<pre class="brush:php; first-line: 194">    &lt;span class="buttonAction"&gt;&lt;?php echo '&lt;span class="text"&gt;' . TEXT_ENTER_QUANTITY . ' ' . tep_draw_input_field('cart_quantity', '1', 'size="5" style="vertical-align:middle;"') . '&lt;/span&gt; ' . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?&gt;&lt;/span&gt;</pre>
<p style="text-align: left;">All we did was to add  <span style="color: #000000;">t</span><span style="color: #000000;">ep_draw_input_field(&#8216;cart_quantity&#8217;, &#8217;1&#8242;, &#8216;size=&#8221;5&#8243;&#8216;)</span>. We gave a name to this field, set the default number we want it to be (1) and set the size (5). You can also add a text, as we did, so that people know what he field is for. In this case, don&#8217;t forget to &#8220;define&#8221; this text in your file <span style="color: #ff0000;">catalog/includes/laguages/english/product_info.php</span>. Just copy the way it is done for other defines.</p>
<p style="text-align: left;">As you see, for version 2.3.1, we also wrapped that text into a &lt;span class=&#8221;text&#8221;&gt;, that we can format as we like in the stylesheet.css file. Also, adding a &#8220;vertical-align:middle;&#8221; to the input field we take care that it align nicely at the same height as the text. This all you are free to do as you like, it is not connected with the main function</p>
<p style="text-align: left;">Next step is in file <span style="color: #ff0000;">c</span><span style="color: #ff0000;">atalog/includes/application_top.php</span>. Instead of &#8220;+1&#8243;, that add 1 item to the cart each time the customer press the button, we want it to use the content of the input field we just created, so we replace &#8220;+1&#8243; with <span style="color: #000000;">+ </span><span style="color: #000000;">$_POST['cart_quantity']</span>. Finally the line in the file looks like this for version rc2a</p>
<p style="text-align: left;">
<pre class="brush:php; first-line: 360">      case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) &amp;&amp; is_numeric($HTTP_POST_VARS['products_id'])) {
                                $cart-&gt;add_cart($HTTP_POST_VARS['products_id'], $cart-&gt;get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']);
                              }</pre>
<p>and like this for version 2.3.1</p>
<pre class="brush:php; first-line: 333">     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) &amp;&amp; is_numeric($HTTP_POST_VARS['products_id'])) {
                                $attributes = isset($HTTP_POST_VARS['id']) ? $HTTP_POST_VARS['id'] : '';
                                $cart-&gt;add_cart($HTTP_POST_VARS['products_id'], $cart-&gt;get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes)) + $HTTP_POST_VARS['cart_quantity'], $attributes);
                              }</pre>
<p style="text-align: left;">You can of course replace the long $HTTP_POST_VARS with $_POST, I left it as is to make things more clear about what is changing and what not</p>
<p style="text-align: left;">A store owner asked me to do this for him, so I did and here are the results</p>
<p style="text-align: left;">How the &#8220;add to cart&#8221; area looked before</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-283" title="plain &quot;add to cart&quot; button" src="http://multimixer.gr/wp-content/uploads/2010/10/ccinputbefore.jpg" alt="" width="540" height="128" /></p>
<p style="text-align: left;">After adding the quantity input field, exactly as it is described here</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-286" title="adding a quantity input field" src="http://multimixer.gr/wp-content/uploads/2010/10/ccinputbox.jpg" alt="" width="540" height="128" /></p>
<p style="text-align: left;">And finally, after adding some css to make it look a little nicer</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-287" title="quantity indput field on product info page" src="http://multimixer.gr/wp-content/uploads/2010/10/ccinputafter.jpg" alt="" width="540" height="128" /></p>
<p style="text-align: left;">You see that it is easy to do as 1 2 3, so why don&#8217;t you try it your self?</p>
<p style="text-align: left;">I tried my self and here is the result of an other &#8220;add to cart&#8221; area I did</p>
<p style="text-align: left;"><a href="http://multimixer.gr/wp-content/uploads/2010/11/addcart1.jpg"><img class="aligncenter size-large wp-image-367" title="A nice add to cart area with quantity input field" src="http://multimixer.gr/wp-content/uploads/2010/11/addcart1-525x62.jpg" alt="A nice add to cart area with quantity input field" width="525" height="62" /></a></p>
<p style="text-align: left;">Don&#8217;t hesitate to ask if you have any problems. Or maybe you post your opinion here?</p>
<blockquote>
<p style="text-align: left;">Update: If you want to go a step further and have a live price update functionality upon quantity and/or options change, then please check here: <a title="live price update" href="http://multimixer.gr/14/10/2014/live-price-update/">Live price update</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/17/11/2010/add-a-quantity-input-field-to-your-product-info-page/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>
