<?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 v2.3</title>
	<atom:link href="http://multimixer.gr/tag/oscommerce-v23/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>Streamline your checkout process in osCommerce</title>
		<link>http://multimixer.gr/23/06/2012/streamline-your-checkout-process-in-oscommerce/</link>
		<comments>http://multimixer.gr/23/06/2012/streamline-your-checkout-process-in-oscommerce/#comments</comments>
		<pubDate>Sat, 23 Jun 2012 17:16:05 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=1254</guid>
		<description><![CDATA[This is a quick tip that will help you to skip the checkout shipping and checkout payment pages if you have only one shipping or payment option enabled. Complete code to copy paste]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">There are many cases where the visitor get just one shipping or payment option presented. This can be the case if you have just one shipping or payment module enabled or it can be that you have conditions for your shipping and payment ways: In this case a visitor from UK will get just one shipping or payment option while a visitor from the USA 3 of them.</p>
<p style="text-align: justify;">In any case, it makes no sense to let people navigate through pages where there is nothing to select and no information presented. All your visitors can do in such a case is to press the &#8220;continue&#8221; button, and this is something the system can do automatically</p>
<p style="text-align: justify;">In this way, you can cut of 2 of the 4 checkout steps and that&#8217;s a huge improvement. People will be transfered directly from the shopping cart page to the checkout confirmation page. Please note, that it case you enable a second shipping or payment module, the page will appear again by it self</p>
<p style="text-align: justify;">The tip presented here comes from the &#8220;tip and trick&#8221; section of the <a title="osCommerce tip" href="http://forums.oscommerce.com/topic/193155-skip-checkout-shipping-and-checkout-payment/page__view__findpost__p__790043" target="_blank">osCommerce forum</a>, to the topic there I <a title="multimixer tip" href="http://forums.oscommerce.com/topic/193155-skip-checkout-shipping-and-checkout-payment/page__view__findpost__p__1495135" target="_blank">contributed</a> my self, unfortunately it&#8217;s getting lost in the crowd and I thing it&#8217;s worth to have it clearly presented. Like each forum post, it evolved over the time.</p>
<p style="text-align: justify;">Lets start, things are easy, you&#8217;ll need just to copy paste</p>
<p>The files you&#8217;ll be working on are</p>
<ul>
<li>catalog/checkout_shipping.php</li>
<li>catalog/checkout_payment.php</li>
</ul>
<p style="text-align: justify;">Make a copy of that files and store them somewhere on your computer, in that way you&#8217;ll be able to get back to the previous status in case you mess up</p>
<h3>1. checkout_shipping.php</h3>
<p>open the file and find following line, it&#8217;s number 97 in a default file</p>
<pre class="brush:xml">// process the selected shipping method</pre>
<p>Add just before following</p>
<pre class="brush:applescript">// bypass if only 1 shipping method available or free shipping
if ( (tep_count_shipping_modules() &lt;= 1) || ($free_shipping == true) ) {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
if ($free_shipping) {
$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
$quote[0]['methods'][0]['cost'] = '0';
} else {
$quote = $shipping_modules-&gt;quote($method, $module);
}
$shipping = array('id' =&gt; $shipping,
'title' =&gt; (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
'cost' =&gt; $quote[0]['methods'][0]['cost']);
$shipping = $shipping_modules-&gt;cheapest();
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}</pre>
<p>Done !</p>
<h3>2. checkout_payment.php</h3>
<p>Open the file and find following line, it&#8217;s number 81 in a default file</p>
<pre class="brush:xml">  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);</pre>
<p>Add just before</p>
<pre class="brush:applescript">// skip if only 1 payment method available
$payment_module_selections = $payment_modules-&gt;selection();
if (sizeof($payment_module_selections) &lt;= 1) {
  if (!tep_session_is_registered('payment')) tep_session_register('payment');
  $payment = $payment_module_selections[0]['id'];
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
}</pre>
<p>Done !</p>
<blockquote><p><span style="font-weight: normal;"><strong>Mini template system users</strong></span><span style="font-weight: normal;">, you can do exactly the same if your want, your files are identical to the default osCommerce version</span></p></blockquote>
<p>Thats all people, try it out</p>
<p>All credits to the original posters at the osCommerce forum</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/23/06/2012/streamline-your-checkout-process-in-oscommerce/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Add more buttons to your osCommerce header</title>
		<link>http://multimixer.gr/19/06/2012/add-more-buttons-to-your-oscommerce-header/</link>
		<comments>http://multimixer.gr/19/06/2012/add-more-buttons-to-your-oscommerce-header/#comments</comments>
		<pubDate>Tue, 19 Jun 2012 13:15:05 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=1220</guid>
		<description><![CDATA[Read here how to add more buttons to your stores header, just beside the existing "cart", "checkout" and "my account" buttons. It's very easy to do, try it out]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">
<p style="text-align: justify;">Even this question has been asked &#8211; and answered &#8211; really many times in the osCommerce forum, it still seem to be a hard thing to do for many people. I recently got an email from a osCommerce user asking exactly this: How to add more buttons to my header, just beside the existing &#8220;cart&#8221;, &#8220;checkout&#8221; and &#8220;my account&#8221; buttons.</p>
<p style="text-align: justify;">This is how the section look by default</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2012/06/contact_us_button_header0.jpg"><img class="aligncenter size-large wp-image-1238" title="The default osCommerce header with 3 buttons" src="http://multimixer.gr/wp-content/uploads/2012/06/contact_us_button_header0-540x77.jpg" alt="The default osCommerce header with 3 buttons" width="540" height="77" /></a></p>
<p style="text-align: justify;">That is really very easy to do, lets start. The file to work on is catalog/includes/header.php. Make a copy of it for backup reasons and open the file (not the copy)</p>
<h3>Step 1: Locate the existing buttons</h3>
<p>They are very easy to find, very close to the top of the file you&#8217;ll see following:</p>
<pre class="brush:php; first-line: 21">  &lt;div id="headerShortcuts"&gt;
&lt;?php
  echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart-&gt;count_contents() &gt; 0 ? ' (' . $cart-&gt;count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .
       tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .
       tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

  if (tep_session_is_registered('customer_id')) {
    echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
  }
?&gt;
  &lt;/div&gt;</pre>
<p style="text-align: justify;">Each of that lines is a button. Well, the term &#8220;button&#8221; is maybe to exactly correct, since they don&#8217;t submit anything. In fact <strong>they are just links looking like buttons</strong>. This happens because of the &#8220;tep_draw_button()&#8221; function of osCommerce, that take a plain link and make it look like a button</p>
<h3>Step 2: Create a new button</h3>
<p>Each button need at least following information</p>
<ul>
<li><strong>a link</strong>: To where should your button link to? It can be any page of your store, like eg &#8220;contact us&#8221;, any product, any category</li>
<li><strong>a text</strong>: There should be a text, so that people know what the button is for</li>
<li><strong>an icon</strong>: This is the small symbol on the left of your button</li>
</ul>
<p>Here is a single button</p>
<pre class="brush:php">tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'))</pre>
<p>In plain english we could say</p>
<blockquote><p><strong>tep_draw_button(button text, button icon, button link)</strong></p></blockquote>
<p style="text-align: justify;">As an example, lets create a button to the contact us page. So we want to link to &#8220;contact_us.php&#8221;, we want the button text to say &#8220;contact us&#8221; and the icon to be an envelope</p>
<h4>2.1 The button link</h4>
<p>This is this part of the button code</p>
<pre class="brush:applescript">tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')</pre>
<p style="text-align: justify;">This is the regular tep_href_link() function used all over osCommerce. For the &#8220;contact_us.php&#8221; page, the link would look like this</p>
<pre class="brush:applescript">tep_href_link(FILENAME_CONTACT_US)</pre>
<p style="text-align: justify;">We don&#8217;t need the SSL part of the link, since contact us is a regular page not SSL protected. As you can see, we did use the constant (FILENAME_CONTACT_US) instead of just typing in the filename (contact_us.php). This has no difference to the link functionality, but it&#8217;s highly recommended to keep this practice. You can find a list of all files and their constants in file catalog/includes/filenames.php</p>
<h4>2.2 The button text</h4>
<p>This is following part of the button code that we use as a reference:</p>
<p>HEADER_TITLE_CHECKOUT</p>
<p style="text-align: justify;">As you can see there is again a &#8220;constant&#8221; used, instead of just typing in the text. This way the store can be multilingual. Even you use just one language in your store right now, it&#8217;s better to keep it that way instead of typing in plain text. Additional benefits are that all text is in one file and that you can change it easily there. Finally, the same text can be reused anywhere in the store</p>
<p>We will use</p>
<p>IMAGE_BUTTON_CONTACT_US</p>
<p style="text-align: justify;">The file to define the text is catalog/includes/languages/english.php (or german.php, italian.php, swahili.php etc). Here you can add to anywhere (maybe after all other defines that are like IMAGE_BUTTON_XY)</p>
<pre class="brush:applescript">define('IMAGE_BUTTON_CONTACT_US', 'Contact us');</pre>
<p>What we did here is, to define, set, declare, that constant IMAGE_BUTTON_CONTACT_US be &#8220;contact us&#8221;in English. Same you need to do for all languages of your store and translate accordingly</p>
<h4>2.3 The button icon</h4>
<p style="text-align: justify;">Here we cant use anything we want, but need to pick an icon from the existing icon set of jQuery UI. There is a large selection available, you can see it on the <a title="Themeroller" href="http://jqueryui.com/themeroller/" target="_blank">themeroller</a> website. Going to the bottom of the site, you&#8217;ll see a listing of all available icons. Hover over each and you&#8217;ll see its name.</p>
<p>For the contact us button, where we want the envelope icon and got the text &#8220;ui-icon-mail-closed&#8221;, so the text I need for the button is &#8220;mail -closed&#8221;</p>
<h4>2.4 Putt it together</h4>
<p>Now after we have the button link, button text and button icon, lets put our new button together again. Here it is</p>
<pre class="brush:php">tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'mail-closed', tep_href_link(FILENAME_CONTACT_US))</pre>
<h3>3 Place the button to the header</h3>
<p>You can place that button to anywhere you like. Now, since we said we want it in the header, lets add it to there.</p>
<pre class="brush:php">  echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart-&gt;count_contents() &gt; 0 ? ' (' . $cart-&gt;count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .
       tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .
       tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

  echo tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'mail-closed', tep_href_link(FILENAME_CONTACT_US));

  if (tep_session_is_registered('customer_id')) {
    echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
  }</pre>
<p style="text-align: justify;">If you want to place the button between the existing &#8220;cart&#8221; and &#8220;checkout&#8221; buttons it would look like this</p>
<pre class="brush:php">  echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart-&gt;count_contents() &gt; 0 ? ' (' . $cart-&gt;count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .
       tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .
       tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'mail-closed', tep_href_link(FILENAME_CONTACT_US)) .
       tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

  if (tep_session_is_registered('customer_id')) {
    echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
  }</pre>
<p>This is how things look like so far</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2012/06/contact_us_button_header1.jpg"><img class="aligncenter size-large wp-image-1245" title="osCommerce header with contact us button" src="http://multimixer.gr/wp-content/uploads/2012/06/contact_us_button_header1-540x76.jpg" alt="osCommerce header with contact us button" width="540" height="76" /></a></p>
<h3>4 Some more button examples</h3>
<p>A nice thing to have would be a login button in the header that would change to logoff in case the customer is already logged in</p>
<p>Here you can change this</p>
<pre class="brush:php">  if (tep_session_is_registered('customer_id')) {
    echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
  }</pre>
<p>to this</p>
<pre class="brush:php">  if (tep_session_is_registered('customer_id')) {
    echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
  } else {
    echo tep_draw_button(IMAGE_BUTTON_LOGIN, 'key', tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  }</pre>
<p>and it will to exactly this</p>
<p style="text-align: justify;">An other thing you can do, is to add a link to an external website, for example your blog. Here we don&#8217;t need to use the tep_href_link() function to create the link since the session will be lost anyway. What we want here is, to make the link target open in a new browser window and to be &#8220;stronger&#8221; than the others</p>
<p style="text-align: justify;">Here is the button:</p>
<p style="text-align: justify;">
<pre class="brush:applescript"> echo tep_draw_button('My blog', 'person', 'http://multimixer.gr', 'primary', array('newwindow'=&gt;'newwindow'));</pre>
<p>You can check the parameters that the tep_draw_button() function accept in file catalog/includes/functions/html_output.php</p>
<p>Here is how our header look now with all that buttons</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2012/06/contact_us_button_header3.jpg"><img class="aligncenter size-large wp-image-1240" title="osCommerce header with many buttons" src="http://multimixer.gr/wp-content/uploads/2012/06/contact_us_button_header3-540x77.jpg" alt="osCommerce header with many buttons" width="540" height="77" /></a></p>
<p style="text-align: justify;">While you are doing in the header section, you could take a look about other things you can do to make it look nicer<a title="Nice header for osCommerce store" href="http://multimixer.gr/25/11/2010/make-a-nice-header-for-your-store-in-oscommerce-version-2-3-1/">: Make a nice header for your osCommerce store</a></p>
<p style="text-align: justify;">Mini template system users: Please don&#8217;t do anything of all this, it&#8217;s not necessary. You can use <a title="Create new links in osCommerce" href="http://minitemplatesystem.com/usage/link-manager-oscommerce/#b" target="_blank">link manager</a> to create links and add them to any <a title="Link manager osCommerce" href="http://minitemplatesystem.com/usage/link-manager-oscommerce/#gb" target="_blank">link groups</a> and <a title="Create menu osCommerce" href="http://minitemplatesystem.com/usage/menu-maker-horizontal-drop-down-navigation-menu/" target="_blank">menu maker</a> to place them either to your main navigation or to your link boxes. There is no need to modify any file</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/19/06/2012/add-more-buttons-to-your-oscommerce-header/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Add a remove button to the shopping cart page</title>
		<link>http://multimixer.gr/05/01/2012/add-remove-button-to-shopping-cart-page/</link>
		<comments>http://multimixer.gr/05/01/2012/add-remove-button-to-shopping-cart-page/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 14:18:12 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=1123</guid>
		<description><![CDATA[In version 2.3.1 of osCommerce, there is no remove button for items placed into the shopping cart, but a plain text link.  Read here how to replace this with a nice button in same style of all other store buttons]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">In version 2.3.1 of osCommerce, there is no remove button for items placed into the shopping cart, but a plain text link. On top of this, the link text is also &#8220;hardcoded&#8221;, so it always says &#8220;remove&#8221;, doesn&#8217;t matter what language you have in use in your store.</p>
<p>That is how the shopping cart page look by default</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/12/button_1.jpg"><img class="aligncenter size-large wp-image-1127" title="Default &quot;remove&quot; link on shopping cart page in osCommerce" src="http://multimixer.gr/wp-content/uploads/2011/12/button_1-540x283.jpg" alt="Default &quot;remove&quot; link on shopping cart page in osCommerce" width="540" height="283" /></a></p>
<p style="text-align: justify;">Let&#8217;s change this, and let&#8217;s create a multilingual button, that will look consistent with all other buttons all over your store. The file we need to work on is</p>
<blockquote><p><strong>catalog/shopping_cart.php</strong></p></blockquote>
<p style="text-align: justify;">Make a copy of that file so you can replace the file you are working on, in case you mess anything up. At about line 97 we can see there following piece of code</p>
<pre class="brush:php; first-line:97;">      $products_name .= '&lt;br /&gt;&lt;br /&gt;' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . '   or &lt;a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&amp;action=remove_product') . '"&gt;remove&lt;/a&gt;';</pre>
<p>To make it a bit more clear what&#8217;s happening here, let&#8217;s break the code into separate lines</p>
<pre class="brush:php; first-line:97;">$products_name .= '&lt;br /&gt;&lt;br /&gt;' .
tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') .
tep_draw_hidden_field('products_id[]', $products[$i]['id']) .
tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') .
'   or &lt;a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&amp;action=remove_product') . '"&gt;remove&lt;/a&gt;';</pre>
<p>The &#8220;remove&#8221; link is following</p>
<pre class="brush:php; first-line:101;">'   or &lt;a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&amp;action=remove_product') . '"&gt;remove&lt;/a&gt;'</pre>
<p style="text-align: justify;">As you can see, the words &#8220;or&#8221; and &#8220;remove&#8221; are hardcoded into the file and the result is the plain text link you can see on your screen. This we are going to replace by a nice button. This is the code we are going to use</p>
<pre class="brush:php; first-line:101;">tep_draw_button(IMAGE_BUTTON_REMOVE, 'trash', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&amp;action=remove_product'))</pre>
<p style="text-align: justify;">As you can see, the link part, including it&#8217;s &#8220;action&#8221; is exactly same as before. New is, that we use the tep_draw_button function of osCommerce</p>
<p style="text-align: justify;">IMAGE_BUTTON_REMOVE is the text for our button, this we wil add later to file catalog/includes/languages/english.php. The word &#8220;trash&#8221; is for the icon we want to use on the button, we can use any of the available icons of the <a href="http://jqueryui.com/themeroller/" target="_blank">jQuery ui theme.</a></p>
<p>So, our code looks now like this</p>
<pre class="brush:php; first-line:97;">$products_name .= '&lt;br /&gt;&lt;br /&gt;' .
tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') .
tep_draw_hidden_field('products_id[]', $products[$i]['id']) .
tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') .
tep_draw_button(IMAGE_BUTTON_REMOVE, 'trash', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&amp;action=remove_product'));</pre>
<p>and in one line, as it was before, like this</p>
<pre class="brush:php; first-line:97;">  $products_name .= '&lt;br /&gt;&lt;br /&gt;' .  tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . tep_draw_button(IMAGE_BUTTON_REMOVE, 'trash', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&amp;action=remove_product'));</pre>
<p>Copy-pasters in a hurry, can just replace line 97 of their file with this line here</p>
<p>Next thing we need to do is, to define the text we want to have displayed on our new button, this we do in file</p>
<blockquote><p>catalog/includes/languages/english.php</p></blockquote>
<p style="text-align: justify;">Here you can add anywhere before the last closing ?&gt; following into the file, it will be better of course if you add it close to the other button text defines</p>
<pre class="brush:php; first-line:210;">      define('IMAGE_BUTTON_REMOVE', 'Remove');</pre>
<p style="text-align: justify;">Please note that this define is globally available all over your sore, so you can use the same constant anywhere else you want to have the text &#8220;remove&#8221; displayed. You can change the text of course to anything that fit your needs, eg to &#8220;kuku&#8221; and you need to add the same define to your other main language files in case you use more languages (eg german.php, spanish.php, swahili.php etc)</p>
<p>Lets lake a look now how our shopping cart page look like</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2012/01/button_2.jpg"><img class="aligncenter size-large wp-image-1139" title="Shopping cart page with &quot;remove&quot; button" src="http://multimixer.gr/wp-content/uploads/2012/01/button_2-540x283.jpg" alt="Shopping cart page with &quot;remove&quot; button" width="540" height="283" /></a></p>
<p>Easy not? Enjoy and lets hope that nobody is going to press this :)</p>
<p>In case you are interested, here&#8217;s an other interesting post about how to <a title="Remove all items from the shopping cart" href="http://www.clubosc.com/remove-all-items-from-shopping-cart.html" target="_blank">remove all items from the shopping cart</a></p>
<p><small>Front page trash can image taken from <a href="http://www.wpclipart.com/" target="_blank">wp clipart</a>, thank you guys</small></p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/05/01/2012/add-remove-button-to-shopping-cart-page/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Styling the modules on the product information page in osCommerce</title>
		<link>http://multimixer.gr/27/07/2011/styling-the-modules-on-the-product-information-page-in-oscommerce/</link>
		<comments>http://multimixer.gr/27/07/2011/styling-the-modules-on-the-product-information-page-in-oscommerce/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 16:10:29 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=1003</guid>
		<description><![CDATA[If you like to change the look of one - or all - the modules on your product information page, keep on reading, it's really very simple. You will need less time than for drinking a coffee]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">The product information page in osCommerce displays usually, beside the product information it self, various modules: For example the &#8220;also purchased&#8221; module, or &#8220;related products&#8221; in case you have that, or &#8220;slave products&#8221; and various others.</p>
<p style="text-align: justify;">All of that modules have a common css styling: The ui widget styling. The module heading is class &#8220;ui-widget_header&#8221; the content is &#8220;ui-widget-content&#8221;. That&#8217;s all fine and can be styled very nicely using <a title="Themeroller" href="http://jqueryui.com/themeroller/" target="_blank">themeroller</a> and you can read here about how to <a title="Get a new theme for your osCommerce store" href="http://multimixer.gr/02/12/2010/how-to-get-a-new-theme-for-your-oscommerce-store/">change the ui theme of your store</a> easily. But what is in case you have more than one module on the same page? Does it not start to look a little boring?</p>
<p style="text-align: justify;">If you like to change the look of one &#8211; or all &#8211; the modules on your product information page, keep on reading, it&#8217;s really very simple. We are going tho change the look of the &#8220;also purchased&#8221; module, that is the most common, since it exist in each store by default</p>
<p>That is how the module look like on an unmodified store</p>
<p style="text-align: center;"><a href="http://multimixer.gr/wp-content/uploads/2011/07/also_purchased_default.jpg"><img class="size-large wp-image-1007 aligncenter" title="The default look of the also purchased module on the product information page in osCommerce" src="http://multimixer.gr/wp-content/uploads/2011/07/also_purchased_default-540x119.jpg" alt="The default look of the also purchased module on the product information page in osCommerce" width="540" height="119" /></a></p>
<p>Applying and other ui-theme, it looks already much different</p>
<p style="text-align: center;"><a href="http://multimixer.gr/wp-content/uploads/2011/07/also_purchased_ui-widget.jpg"><img class="size-large wp-image-1008 aligncenter" title="After changing the ui-theme it looks already better. Theme in use is &quot;smoothness&quot;" src="http://multimixer.gr/wp-content/uploads/2011/07/also_purchased_ui-widget-540x156.jpg" alt="After changing the ui-theme it looks already better. Theme in use is &quot;smoothness&quot;" width="540" height="156" /></a></p>
<p style="text-align: justify;">Please note that the image above shows a store designed with mini template system, other design changes you see in relation to the default set up are because of that. The ui theme will change the colors of your module, not more</p>
<p>So, what to do to change the look of that module?</p>
<p style="text-align: justify;">First lets go to apply a unique id to the whole module, so we can be sure that any setting we do will affect just this and not anything else too.</p>
<p style="text-align: justify;">The file we need is catalog/includes/modules/also_purchased_products.php. All we do here is to add one id to the wrapping div as follows</p>
<p>Change this</p>
<pre class="brush:xml">  &lt;div class="ui-widget infoBoxContainer"&gt;</pre>
<p>to this</p>
<pre class="brush:xml">  &lt;div id="alsoPurchased" class="ui-widget infoBoxContainer"&gt;</pre>
<p>You can close and upload the file.</p>
<p>Anything else we do in file catalog/stylesheet.css (<strong>for mini template system users the file is catalog/mts/themes/theme_base_001/style_custom.css</strong>)</p>
<p>Here is some css that I used</p>
<pre class="brush:applescript">#alsoPurchased .ui-widget-content{ border:1px solid #7ba6d3; padding-top:30px;  -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px;}
#alsoPurchased .ui-widget-header{border:none; background:none; margin:0; font-size:14px; font-weight:normal; position:relative; bottom:-10px;}
#alsoPurchased .ui-widget-header span{color:#fff; background:#7ba6d3; padding:10px; border:1px solid #7ba6d3;  -moz-border-radius:10px 3px 3px 0; -webkit-border-radius:3px; border-radius:3px;}</pre>
<p>And that is how the result look like</p>
<p style="text-align: center;"><a href="http://multimixer.gr/wp-content/uploads/2011/07/also_purchased_custom.jpg"><img class="size-large wp-image-1010 aligncenter" title="A totally different look for the module" src="http://multimixer.gr/wp-content/uploads/2011/07/also_purchased_custom-540x182.jpg" alt="A totally different look for the module" width="540" height="182" /></a></p>
<p style="text-align: justify;">The orange separation lines can also be added easily. And of course you can change the css settings completely as you like Here is an other example of styling the &#8220;master slave&#8221; listing module that I added to an other site</p>
<p style="text-align: center;"><a href="http://multimixer.gr/wp-content/uploads/2011/07/master_slave_custom.jpg"><img class="size-large wp-image-1011 aligncenter" title="Same styling for the master slave module of osCommerce" src="http://multimixer.gr/wp-content/uploads/2011/07/master_slave_custom-540x233.jpg" alt="Same styling for the master slave module of osCommerce" width="540" height="233" /></a></p>
<p>Now go on and make your store a little more pretty</p>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/27/07/2011/styling-the-modules-on-the-product-information-page-in-oscommerce/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Create a google AdSense box for your osCommerce store</title>
		<link>http://multimixer.gr/26/07/2011/create-a-google-adsense-box-for-your-oscommerce-store/</link>
		<comments>http://multimixer.gr/26/07/2011/create-a-google-adsense-box-for-your-oscommerce-store/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 18:28:21 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=978</guid>
		<description><![CDATA[If you like the idea of having a box on your store displaying google ads, then here is the way to do it. But honestly, if your store doesn't make enough money, you should focus on that, or start advertising for the store and not on the store]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I had a client who wanted to display google AdSense adds on the right column of his store. Now I need to say, that I&#8217;m not the greatest fan of such an idea: A store is there to make money by selling its products or services, not through advertising or anything else. Each visitor should be focused on what the store has to offer, any ads or similar displays are just a distraction in my opinion.</p>
<p style="text-align: justify;">Honestly, if your store doesn&#8217;t make enough money, you should focus on that, or start advertising <strong>for</strong> the store and <strong>not on</strong> the store</p>
<p>Anyway, this was the request, so if you like something like this too, here you go</p>
<h3>Step 1: Create the files</h3>
<p style="text-align: justify;">All boxes are in osCommerce in folder <strong>catalog/includes/modules/boxes/</strong></p>
<p>The corresponding language files are in folder <strong>catalog/includes/languages/english/modules/boxes/ </strong>and have exactly the same filename as the box it self</p>
<p style="text-align: justify;">What we do now is to take the most simple box that exist, that is bm_information.php, make a copy and rename it to be bm_adsense.php. Same we do with the corresponding language file. So we have 2 fies now called bm_adsense.php.</p>
<p style="text-align: justify;">Keep them open in your editor, do not upload them and more important do not install and activate them in admin, you will get errors at that stage</p>
<h3>Step 2: Basic setup</h3>
<p style="text-align: justify;">As we know, all boxes are so called &#8220;classes&#8221; and do write configuration values (constants) to the database. That mean that some parts of the content of that files must be unique.</p>
<p style="text-align: justify;">Before doing anything else, we need to make the file contents &#8220;unique&#8221; in that meaning. We do this by replacing class function names and constants as follows:</p>
<p style="text-align: justify;"><strong>1 Box file: class and function names &#8211; 3 replacements</strong></p>
<p style="text-align: justify;">Replace all instances of  &#8221;bm_information&#8221; with &#8220;bm_adnsense&#8221;, so for example, on top of the file, it was</p>
<p style="text-align: justify;">
<pre class="brush:php">  class bm_information {
    var $code = 'bm_information';</pre>
<p>and it will look like</p>
<pre class="brush:php">  class bm_adsense {
    var $code = 'bm_adsense';</pre>
<p><strong>2 Box file: Constants &#8211; 18 replacements</strong></p>
<p style="text-align: justify;">replace all instances of &#8220;MODULE_BOXES_INFORMATION&#8221; with &#8220;MODULE_BOXES_ADSENSE&#8221;  Please note the capital letters.</p>
<p>For example it was</p>
<pre class="brush:php">      if ( defined('MODULE_BOXES_INFORMATION_STATUS') ) {
        $this-&gt;sort_order = MODULE_BOXES_INFORMATION_SORT_ORDER;
        $this-&gt;enabled = (MODULE_BOXES_INFORMATION_STATUS == 'True');</pre>
<p>and now it look like</p>
<pre class="brush:php">      if ( defined('MODULE_BOXES_ADSENSE_STATUS') ) {
        $this-&gt;sort_order = MODULE_BOXES_ADSENSE_SORT_ORDER;
        $this-&gt;enabled = (MODULE_BOXES_ADSENSE_STATUS == 'True');</pre>
<p><strong>3 laguage file: Constants</strong></p>
<p style="text-align: justify;">Same thing you do in the language file, well, ok, you don&#8217;t need all that defines, so you can basically replace the contents of that file with this</p>
<pre class="brush:php">  define('MODULE_BOXES_ADSENSE_TITLE', 'adsense');
  define('MODULE_BOXES_ADSENSE_DESCRIPTION', 'Show adsense box');
  define('MODULE_BOXES_ADSENSE_BOX_TITLE', 'adsense');</pre>
<p>Right now you can upload the files if you like and go and enable them in your admin panel under modules&gt;boxes. What you have now is a clone of the information box. Next step will be to modify the file for our purpose</p>
<h3>Step 3 :File modification</h3>
<p>All we have to do now, is to create and add to that box a new text input field to where we will add our adsense code in the administration panel</p>
<p>We need one more configuration constant for the database, that we create as follows in function install()</p>
<pre class="brush:php">        tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'adSense code', 'MODULE_BOXES_ADSENSE_CODE', '', 'Paste the adSense code into here', '6', '4', 'tep_draw_textarea_field(\'configuration[MODULE_BOXES_ADSENSE_CODE]\', false, 35, 20, ', now())" );</pre>
<p>And we need of course to add that constant to the array of keys, as follows</p>
<pre class="brush:php">    function keys() {
      return array('MODULE_BOXES_ADSENSE_STATUS', 'MODULE_BOXES_ADSENSE_CONTENT_PLACEMENT', 'MODULE_BOXES_ADSENSE_SORT_ORDER', 'MODULE_BOXES_ADSENSE_CODE');
    }</pre>
<p>Last thing to do is, to set our box to display whatever we entered into the text box. This we do in function dataF() that will look after our changes, just like this</p>
<pre class="brush:php">    function dataF() {

      $data = '&lt;div style="text-align:center;"&gt;';
      $data .= MODULE_BOXES_ADSENSE_CODE;
      $data .='&lt;/div&gt;';

	  return $data;
    }</pre>
<p>Please note that if you did not do the changes as described <a title="Separate data from execution in the osCommerce boxes" href="http://multimixer.gr/03/01/2011/separating-data-from-execution-in-oscommerce-boxes/">here</a> you will not find such a function in your box. You will need to do that changes to function execute() accordingly</p>
<p>Guess what?</p>
<p>We are done ! Really !</p>
<p>Lets go to the administration panel to see what we did. We will find our box under modules&gt;boxes, we will need to install it, and by clicking on &#8220;edit&#8221; we have following</p>
<p><img class="aligncenter size-large wp-image-992" title="Add your adsense code in your osCommerce administration" src="http://multimixer.gr/wp-content/uploads/2011/07/adsense_edit-540x283.jpg" alt="Add your adsense code in your osCommerce administration" width="540" height="283" /></p>
<p>and a preview in the admin</p>
<p><img class="aligncenter size-large wp-image-993" title="Live adsense preview in your oscommerce administration" src="http://multimixer.gr/wp-content/uploads/2011/07/adsense_preview-540x283.jpg" alt="Live adsense preview in your oscommerce administration" width="540" height="283" /></p>
<p>And that is how the box look like on my clients site</p>
<p><img class="aligncenter size-large wp-image-994" title="Adsense ads on your osCommerce store" src="http://multimixer.gr/wp-content/uploads/2011/07/adsense_website1-540x283.jpg" alt="Adsense ads on your osCommerce store" width="540" height="283" /></p>
<p>If you like this idea too, then go ahead and do it, and if you ge rich because of your ads, you can buy me a beer :)</p>
<p>In the same way you can create of course any box. Even this bo here can be used for other purposes too, for example to display plain text (just add plain text into the textarea in admin instead of the adsense code) or images or anything like that</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/26/07/2011/create-a-google-adsense-box-for-your-oscommerce-store/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Move social bookmarks to the product information body</title>
		<link>http://multimixer.gr/26/07/2011/move-social-bookmarks-to-the-product-information-page/</link>
		<comments>http://multimixer.gr/26/07/2011/move-social-bookmarks-to-the-product-information-page/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 16:29:00 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=956</guid>
		<description><![CDATA[Read how to move the social bookmark links into the body of the product information page in osCommerce. It's very easy and useful in case you don't have any columns in your store]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I&#8217;m getting this question all the time: How to move the social bookmark links into the body of the product information page in osCommerce</p>
<p style="text-align: justify;">Instead of answering each time by email, I thought to make a quick post about so that anyone who is interested can do it. Instructions are same for regular osCommerce users and mini template system users</p>
<p style="text-align: justify;">Why should somebody want to move that social bookmarks into the page body? As we know, there is a special box in osCommerce, called &#8220;bm_social_bookmarks.php&#8221; that do exactly this. Well ok, it happens that some users don&#8217;t want to have any columns, but still want to have that bookmarks</p>
<p>Lets start, there are 2 ways to do it</p>
<h3>Way 1: Output the box contents to the product information page</h3>
<p>Things are very simple here. First you need to do the changes to all of your boxes as described <a title="Separating data from execution in osCommerce boxes" href="http://multimixer.gr/03/01/2011/separating-data-from-execution-in-oscommerce-boxes/">here</a></p>
<p style="text-align: justify;">Then, all you have to do is to output the contents of box &#8220;bm_information.php&#8221; to anywhere you would like the social bookmarks to appear, like this</p>
<pre class="brush:php">if (class_exists(bm_social_bookmarks)) {
$boxdata = new bm_social_bookmarks;
echo $boxdata-&gt;dataF();
}</pre>
<p style="text-align: justify;">Now, ok, you may say that you don&#8217;t want this &#8220;boxed look&#8221; on the product information page. Unfortunately data is still mixed with html in osCommerce, so, the only thing you can do is to style that box via css (an article about that will follow) or to go on with way 2</p>
<h3>Way 2 : use the box code on the product information page</h3>
<p>The only file to work on is catalog/product_info.php Into this file, we are going to add following code</p>
<pre class="brush:php">&lt;?php
      if (tep_not_null(MODULE_SOCIAL_BOOKMARKS_INSTALLED)) {
        $sbm_array = explode(';', MODULE_SOCIAL_BOOKMARKS_INSTALLED);
        $social_bookmarks = array();
        foreach ( $sbm_array as $sbm ) {
          $class = substr($sbm, 0, strrpos($sbm, '.'));
          if ( !class_exists($class) ) {
            include(DIR_WS_LANGUAGES . $language . '/modules/social_bookmarks/' . $sbm);
            include(DIR_WS_MODULES . 'social_bookmarks/' . $class . '.php');
          }
          $sb = new $class();
          if ( $sb-&gt;isEnabled() ) {
            $social_bookmarks[] = $sb-&gt;getOutput();
          }
        }
        if (!empty($social_bookmarks))  $social = implode(' ', $social_bookmarks);
      }
?&gt;</pre>
<p style="text-align: justify;">There is nothing new here, it&#8217;s just the code used in the bm_socials_bookmarks.php box. Only addition is that, we do check if any social bookmarks modules are installed before we proceed, to avoid the case to look for a class if there is nothing there.</p>
<p style="text-align: justify;">Anyway, you can place that code to anywhere you like in product_info.php. Just take care to remove the opening and clsing hp tags (&lt;?php &#8230;. ?&gt;) in case you are already in php mode. This code does not display the bookmarks yet, so it really doesn&#8217;t matter to where you will place it, so lets say you add it after this section</p>
<pre class="brush:php">    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . '&lt;span class="smallText"&gt;[' . $product_info['products_model'] . ']&lt;/span&gt;';
    } else {
      $products_name = $product_info['products_name'];
    }
?&gt;</pre>
<p style="text-align: justify;">Next part is to decide about the display of that buttons. All we have to do is, to echo or variable $social that we created with the code above. This is completely up to you and your design I will add that code just before the buttons section, that is where it says</p>
<pre class="brush:xml">  &lt;div class="buttonSet"&gt;</pre>
<p>I will also wrap that into a &lt;p&gt;&lt;/p&gt;, so that it looks like this</p>
<pre class="brush:xml">  &lt;p class="social"&gt;&lt;?php echo $social ?&gt;&lt;/p&gt;

  &lt;div class="buttonSet"&gt;</pre>
<p style="text-align: justify;">You noticed that I gave a class to my new &lt;p&gt;, I call it &#8220;social&#8221; but you can call it &#8220;kuku&#8221; or &#8220;titanic&#8221; or anything you like. I can now style that section as I like, for example some basic css looks like this</p>
<pre class="brush:css">.social {text-align:right; padding:0 20px;}
p.social{margin:0;}
.social img{ vertical-align:middle;}</pre>
<p>This you can add to the bottom of your stylesheet.css file</p>
<p><strong>Mini template system users, please use following basic css</strong></p>
<pre class="brush:css">#product_info .social {text-align:right; padding:0 20px; position:relative; top:-20px;}
#product_info p.social{margin:0;}
#product_info .social img{ vertical-align:middle;}</pre>
<p>and add it to file catalog/mts/themes/theme_base_001/style_custom.css</p>
<p>That&#8217;s all, and here is how it looks on one site where I did this</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/07/social_bookmarks_product_info.jpg"><img class="aligncenter size-large wp-image-965" title="Social bookmarks on the product information page in osCommerce" src="http://multimixer.gr/wp-content/uploads/2011/07/social_bookmarks_product_info-540x139.jpg" alt="Social bookmarks on the product information page in osCommerce" width="540" height="139" /></a></p>
<p>Enjoy</p>
<p>Image of article heading on the front page is from <a href="http://www.thelogorunner.com/blog/free-social-bookmarking-icons/" target="_blank">logorunner</a> you can go and pick some nice icons from there</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/26/07/2011/move-social-bookmarks-to-the-product-information-page/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Using @font-face in osCommerce</title>
		<link>http://multimixer.gr/21/06/2011/font_face_oscommerce/</link>
		<comments>http://multimixer.gr/21/06/2011/font_face_oscommerce/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 13:29:33 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=925</guid>
		<description><![CDATA[It belongs already to a kind of a standard in web design to use custom fonts instead of the so called "web sefe" fonts. It looks like the osCommerce world didn't heard about this yet. This is a short explanation on how to do it for your store]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">It belongs already to a kind of a standard in web design to use custom fonts instead of the so called &#8220;web sefe&#8221; fonts or even images to get customized font types on the screen.</p>
<p style="text-align: justify;">It looks like the osCommerce world didn&#8217;t heard about this yet. Like all of the osCommerce stores that I&#8217;ve seen use either the default fonts (Lucida Grande, Lucida Sans, Verdana, Arial, sans-serif) or any other combination of the so called &#8220;web safe&#8221; fonts.</p>
<p style="text-align: justify;">I wonder why, since this is a great and easy way to get, or to improve, the look and feel of your store</p>
<p style="text-align: justify;">This is a short and easy to follow &#8220;mini tutorial&#8221; about adding (almost) any font type you like to your osCommerce store. There are various tutorials and posts out there about @font-face usage in general (for example <a href="http://sixrevisions.com/css/font-face-guide/" target="_blank">here</a> and <a href="http://spyrestudios.com/21-awesome-font-face-embedable-typefaces/" target="_blank">here</a>), so I want to concentrate here just on how to implement this in osCommerce</p>
<h3>Step 1: Get the font you like</h3>
<p style="text-align: justify;">There is a great site that provide free complete font face kits that you can simply download and use on your site: <a href="http://www.fontsquirrel.com/" target="_blank">Font Squirrel</a> There are so many font&#8217;s to choose from that you&#8217;ll find for sure something that fit your needs.</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/Font-Squirrel.jpg"><img class="aligncenter size-large wp-image-931" title="Font Squirrel offers many fonts to choose from" src="http://multimixer.gr/wp-content/uploads/2011/06/Font-Squirrel-540x283.jpg" alt="Font Squirrel offers many fonts to choose from" width="540" height="283" /></a></p>
<p style="text-align: justify;">Select the one you like and you&#8217;ll get to a screen that offers even more details for the selected font type</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/Font-Squirrel_font.jpg"><img class="aligncenter size-large wp-image-933" title="Font type details" src="http://multimixer.gr/wp-content/uploads/2011/06/Font-Squirrel_font-540x283.jpg" alt="Font type details" width="540" height="283" /></a></p>
<p style="text-align: justify;">Now click on &#8220;@font-face kit&#8221; that will take you to the download screen</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/Font-Squirrel_download.jpg"><img class="aligncenter size-large wp-image-935" title="Font Squirrel download fonts" src="http://multimixer.gr/wp-content/uploads/2011/06/Font-Squirrel_download-540x283.jpg" alt="Font Squirrel download fonts" width="540" height="283" /></a></p>
<p style="text-align: justify;">Now, just click on &#8220;download font face kit&#8221;. You will get a zip file to your computer. Unzip it.</p>
<h3>Step 2:  Add the fonts to your store</h3>
<p style="text-align: justify;">The contents of the folder you just got will look like this. There can be more files included, depending on the font type you selected, since some of them have many sub variations, such as thin, bold etc</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/download_package.jpg"><img class="aligncenter size-large wp-image-940" title="downloaded font package" src="http://multimixer.gr/wp-content/uploads/2011/06/download_package-540x212.jpg" alt="downloaded font package" width="540" height="212" /></a></p>
<p style="text-align: justify;">Now open the file stylesheet.css and copy all of it&#8217;s contents into the top of your file catalog/stylesheet.css. The content will look like this, again, there is maybe more, depending on the selected font type</p>
<pre class="brush:css">@font-face {
    font-family: 'MichromaRegular';
    src: url('Michroma-webfont.eot');
    src: url('Michroma-webfont.eot?#iefix') format('embedded-opentype'),
         url('Michroma-webfont.woff') format('woff'),
         url('Michroma-webfont.ttf') format('truetype'),
         url('Michroma-webfont.svg#MichromaRegular') format('svg');
    font-weight: normal;
    font-style: normal;

}</pre>
<p style="text-align: justify;">Leave this as is for now, keep the file open, and zip again the downloaded font folder. You don&#8217;t need to include the demo.html and the stylesheet.css, just the rest of the files. In any case, do not rename the folder.</p>
<p style="text-align: justify;">Create 2 new folders named /css/fonts/ within folder /ext/ on your server, so you get following folder structure</p>
<blockquote style="text-align: center;"><p><strong>[catalog]/ext/css/fonts/</strong></p></blockquote>
<p style="text-align: justify;">Now upload the zipped font folder to this location and unzip it again. You should now have following folders on your server</p>
<blockquote style="text-align: center;"><p><strong>[catalog]/ext/css/fonts/michroma-fontfacekit/</strong></p></blockquote>
<p>It&#8217;s not necessary to mention that the actual folder name depend on the font kit you selected, so please do not rename you folder to this folder name here, this is just an example</p>
<p>Next thing is to set the right path in the stylesheet.css file. This is the path to the folder to where you just uploaded the font kit. So, your file catalog/stylesheet.css will look like this now</p>
<pre class="brush:css">@font-face {
    font-family: 'MichromaRegular';
    src: url('ext/css/fonts/michroma-fontfacekit/Michroma-webfont.eot');
    src: url('ext/css/fonts/michroma-fontfacekit/Michroma-webfont.eot?#iefix') format('embedded-opentype'),
         url('ext/css/fonts/michroma-fontfacekit/Michroma-webfont.woff') format('woff'),
         url('ext/css/fonts/michroma-fontfacekit/Michroma-webfont.ttf') format('truetype'),
         url('ext/css/fonts/michroma-fontfacekit/Michroma-webfont.svg#MichromaRegular') format('svg');
    font-weight: normal;
    font-style: normal;
}</pre>
<h3>Step 3: Use the new fonts</h3>
<p>Final step now is to start using the new fonts. You can use them in the complete store or for selected areas of your store.</p>
<p>If for example, you want to use them everywhere, then apply them to the &lt;body&gt; tag as follows</p>
<pre class="brush:css">body, .ui-widget {font-family:MichromaRegular, Arial, Helvetica, sans-serif;}</pre>
<p>You can see that here I use this font in all text and in anything that has the class .ui-widget. Also you see that I added some common fonts, that is &#8220;just in case&#8221; something goes wrong with the new fonts</p>
<p>You can be much more selective with your fonts, for example use them only for the page headings, like this</p>
<pre class="brush:css">h1 {font-family:MichromaRegular, Arial, Helvetica, sans-serif;}</pre>
<p>Here is an example of applying a font-face to just the &lt;h1&gt; tag</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/font_example.jpg"><img class="aligncenter size-large wp-image-949" title="The category title has a new font type" src="http://multimixer.gr/wp-content/uploads/2011/06/font_example-540x393.jpg" alt="The category title has a new font type" width="540" height="393" /></a></p>
<p>What else you can do? You can use more than one font-face, for example have ne for the headings, an other one for the product information page, an other one for the footer etc etc. Just take care to keep a nice balance</p>
<p>Now, go on and add some nice fonts to your store</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/21/06/2011/font_face_oscommerce/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How to add google analytics to your osCommerce store</title>
		<link>http://multimixer.gr/06/06/2011/how-to-add-google-analytics-to-your-oscommerce-store/</link>
		<comments>http://multimixer.gr/06/06/2011/how-to-add-google-analytics-to-your-oscommerce-store/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 11:25:16 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=897</guid>
		<description><![CDATA[Adding google analytics to your osCommerce store became in version 2.3.1 a very easy process: There are no files to edit or any code to add to anywhere. All you have to do is to install the module in your administration panel.]]></description>
			<content:encoded><![CDATA[<p>I just saw an other forum post in the <a href="http://forums.oscommerce.com/topic/376041-copy-the-following-code/" target="_blank">osCommerce forum</a>, asking how to add google analytics to a osCommerce store. Adding google analytics to your osCommerce store became in version 2.3.1 a very easy process: There are no files to edit or any code to add to anywhere. All you have to do is to install the module in your administration panel.</p>
<p>Let&#8217;s take things from the beginning and step by step, there are actually just to steps to do</p>
<h4>1 Get your code from google</h4>
<p>First please go to the <a href="http://www.google.com/analytics/" target="_blank">google analytics website</a>. In case you don&#8217;t have a google analytics account, you will need to create one, if you have, just login.</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/google_analytics_2.jpg"><img class="aligncenter size-large wp-image-899" title="Login to the google analytics website or create a new account" src="http://multimixer.gr/wp-content/uploads/2011/06/google_analytics_2-540x280.jpg" alt="Login to the google analytics website or create a new account" width="540" height="280" /></a></p>
<p>Second step is to create an account and a profile for the website you want to start tracking, your store in this case. The instructions about how to do that are very detailed on the google website, so there is no reason to repeat this here. The screen you will face will look like this</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/google_analytics_4.jpg"><img class="aligncenter size-large wp-image-901" title="Create a new account for your website" src="http://multimixer.gr/wp-content/uploads/2011/06/google_analytics_4-540x185.jpg" alt="Create a new account for your website" width="540" height="185" /></a>You could also create just a new &#8220;profile&#8221; in case your store is just a pert of your complete website, this depends on how you want your data to be grouped and displayed</p>
<p>Important to start tracking your store is to get the unique tracking number, that looks like this</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/google_analytics_6.jpg"><img class="aligncenter size-large wp-image-902" title="The google analytics tracking number" src="http://multimixer.gr/wp-content/uploads/2011/06/google_analytics_6-540x36.jpg" alt="The google analytics tracking number" width="540" height="36" /></a>The number we need is the one that start with UA- in the image above. Please do not use the number on the image here, you will get your own number from google. In case you want to add &#8220;ecommerce tracking&#8221;, press on edit on the right hand side of your profile line and enable it from there</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/google_analytics_7.jpg"><img class="aligncenter size-large wp-image-906" title="adding ecommerce tracking" src="http://multimixer.gr/wp-content/uploads/2011/06/google_analytics_7-540x314.jpg" alt="adding ecommerce tracking" width="540" height="314" /></a></p>
<h4>2 Install the google analytics module</h4>
<p>Now, after we have the google analytics number, lets add it to our osCommerce store. We need to login to the administration panel and then click on modules&gt;header tags and install on the top right corner. They may be several modules available for installation, the one we need is called, how else, &#8220;google analytics&#8221;. Install it</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/osc_analytics_5.jpg"><img class="aligncenter size-large wp-image-909" title="install the google analytics module in the osCommerce administration panel" src="http://multimixer.gr/wp-content/uploads/2011/06/osc_analytics_5-540x280.jpg" alt="install the google analytics module in the osCommerce administration panel" width="540" height="280" /></a></p>
<p>Last step is to add the google number to the module and to enable ecommerce tracking in case we have it enabled at google too.</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/06/osc_analytics_6.jpg"><img class="aligncenter size-large wp-image-911" title="Add google analytics to your oscommerce store" src="http://multimixer.gr/wp-content/uploads/2011/06/osc_analytics_6-540x307.jpg" alt="Add google analytics to your oscommerce store" width="540" height="307" /></a>Just type in the number, that&#8217;s it. As for the &#8220;Javascript Placement&#8221; I personally prefer to add it to the footer, it makes no difference to the tracking results</p>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/06/06/2011/how-to-add-google-analytics-to-your-oscommerce-store/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Making a osCommerce template: all the progress step by step</title>
		<link>http://multimixer.gr/16/05/2011/making-a-oscommerce-template-all-the-progress-step-by-step/</link>
		<comments>http://multimixer.gr/16/05/2011/making-a-oscommerce-template-all-the-progress-step-by-step/#comments</comments>
		<pubDate>Mon, 16 May 2011 11:42:27 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[mini template system]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=807</guid>
		<description><![CDATA[Follow me and watch how a create a new osCommerce template. All the process, step by step from the default look into a totally new and customized theme. This is not meant to be a tutorial, but still, I hope you will get some tips and tricks and maybe some inspiration]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I got a request to create a new osCommerce store. Very happy about this of course, new projects are always welcome, but more important, I liked the initial design idea, and that&#8217;s a great motivation always. Here are some of the images I got about how the website should look like</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/sample_product.jpg"><img class="alignleft size-medium wp-image-808" title="sample drawing of the product information page" src="http://multimixer.gr/wp-content/uploads/2011/05/sample_product-300x263.jpg" alt="sample drawing of the product information page" width="243" height="213" /></a><a href="http://multimixer.gr/wp-content/uploads/2011/05/sample_listing.jpg"><img class="size-medium wp-image-809 alignright" title="sample of categories/product listing page" src="http://multimixer.gr/wp-content/uploads/2011/05/sample_listing-300x263.jpg" alt="sample of categories/product listing page" width="243" height="213" /></a><br style="clear: both;" /></p>
<p style="text-align: justify;">It is a great help to get a concrete information about the clients vision on how the website should look like and even more to get a message like this one: &#8220;<em>You have free license to do what you think works best and looks good. I believe in your artistic taste.&#8221;</em></p>
<p style="text-align: justify;">Since this looks like a very promising project, the design is far away of whatever could be called a &#8220;stock osCommerce design&#8221;, I decided to post the progress of designing this new theme here. The post will be updated as I go, so if you like you can check back from time to time to see what I&#8217;m doing. Feel free to post any comments about anything.</p>
<p>The store is live and you can visit it if you like here <a title="Custom handmade titanium backcovers" href="http://maselements.com/" target="_blank">Mas Design</a></p>
<h3>Installing osCommerce</h3>
<p style="text-align: justify;">First step of course is to install osCommerce on my local computer using XAMPP. I&#8217;m going to use the latest production ready version, and hat is version 2.3.1 (version 3 is not ready to be used on live stores)</p>
<p style="text-align: justify;">That is how the product information page look like by default (I&#8217;m going to start the design with this page). Columns have been removed, that is very easy to do in the administration panel under <strong>admin&gt;modules&gt;boxes</strong>. You can disable there any boxes you don&#8217;t want, if you disable them all, you will get a layout without any columns or boxes</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info1.png"><img class="aligncenter size-large wp-image-832" title="Default layout of product information page in osCommerce" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info1-540x322.png" alt="Default layout of product information page in osCommerce" width="540" height="322" /></a></p>
<p style="text-align: justify;">I&#8217;m also going to use<a href="http://minitemplatesystem.com" target="_blank"> mini template system</a> for the design. <span style="font-size: 0.8em;">(please note that mini template system is a commercial addon for osCommerce, do not click the link if you are not interested in anything that is not free and keep on reading here)</span></p>
<p style="text-align: justify; padding-bottom: 0px; margin-bottom: 0px;">The reasons to use mini template system for this are following:</p>
<blockquote>
<ul style="margin: 0; padding: 0 10px 0 0;">
<li style="text-align: justify;">To have all design and template related files in one folder and not all over the osCommerce installation</li>
<li style="text-align: justify;">To be able to switch to an other template any time and for any reason, without having to modify any file</li>
<li style="text-align: justify;">To be able to use all the mini template system features to create the design easier, but most important</li>
<li style="text-align: justify;">To give the ability to my client to manage his template easily maknig any necessary adjustements him self without having to contact (and pay) me or anyone else for this</li>
</ul>
</blockquote>
<p>Having mini template system already installed on osCommerce, next step is to create a new template and activate it in the administation panel</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/mas_template.png"><img class="aligncenter size-large wp-image-833" title="Installing and activating a new template folder. All design will be done within this template " src="http://multimixer.gr/wp-content/uploads/2011/05/mas_template-540x284.png" alt="Installing and activating a new template folder. All design will be done within this template" width="540" height="284" /></a></p>
<p>That is how the same product information page look like after installing the template.</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info2.png"><img class="aligncenter size-large wp-image-834" title="The product information page in osCommerce using mini template system" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info2-540x417.png" alt="The product information page in osCommerce using mini template system" width="540" height="417" /></a></p>
<p>On this base and within this template folder we will create the new template. Although I will use mini template system, following explanations will mainly point out what I would do if working on a default osCommerce store so that anyone interested can follow</p>
<h3>Changing header and footer, adding background image</h3>
<p style="text-align: justify;">Header and foter affect the design the most. Changing them will give us immediately a new look and feeling and also, hopefully an inspiration on how to go on. To have the background image right away will give a feeling for all colors to be used</p>
<p style="text-align: justify;">The <strong>background image</strong> can be added easily in the css file, this is in case of mini template system the file catalog/mts/themes/themplatefolder.style.css for default osCommerce it is catalog/stylesheet.css. We do add the background directly to the &lt;body&gt; as follows</p>
<pre class="brush:css">body {background:url(images/backgroundPlain_2000x1718.jpg)}</pre>
<p style="text-align: justify;">There are of course many settings you can do here, depending on what type of background image you&#8217;re going to use (eg a large one as in this case here or a small one that you want to repeat etc) You can read more about at <a href="http://www.w3schools.com/css/css_background.asp" target="_blank">w3schools</a>. It is important in any case to have the image uploaded on your server and to set the correct path to it, in this case it is in folder /images/ but it could be in any folder</p>
<p style="text-align: justify;">In the <strong>header section</strong> only thing we do right now is to remove any menus, backgrounds etc and to leave just the logo in place. We will add a menu in a later step. The file to do this (in a default osCommerce set up) is catalog/includes/header.php, if using mini template system, you will find the file in catalog/includes/mts/themes/templatefolder/files.</p>
<p style="text-align: justify;">In the <strong>footer section</strong> we can already do more. Since we don&#8217;t want a thick footer with many links and stuff in in, all we have to do is a simple &lt;ul&gt;&lt;li&gt; structure, add the links we need to there (placeholder links for now) and style a little in the css file. The file to work on is called &#8220;footer.php&#8221; and is at the same location as the header file. As an example, the section of the footer that holds the left hand links, look like this in the file</p>
<p style="text-align: justify;">
<pre class="brush:xml">        &lt;ul class="left"&gt;
          &lt;li&gt;&lt;?php echo '&lt;a href="'. tep_href_link(FILENAME_DEFAULT) .'"' . 'class="menu"' . '&gt;'. 'home' .'&lt;/a&gt;'; ?&gt;&lt;/li&gt;
          &lt;li&gt;&lt;?php echo '&lt;a href="'. tep_href_link(FILENAME_DEFAULT) .'"' . 'class="menu"' . '&gt;'. 'one link' .'&lt;/a&gt;'; ?&gt;&lt;/li&gt;
          &lt;li&gt;&lt;?php echo '&lt;a href="'. tep_href_link(FILENAME_DEFAULT) .'"' . 'class="menu"' . '&gt;'. 'one link' .'&lt;/a&gt;'; ?&gt;&lt;/li&gt;
          &lt;li&gt;&lt;?php echo '&lt;a href="'. tep_href_link(FILENAME_CONTACT_US).'"' . 'class="menu"' . '&gt;'. 'contact' .'&lt;/a&gt;'; ?&gt;&lt;/li&gt;
        &lt;/ul&gt;</pre>
<p style="text-align: justify;">That is how the website look like after doing this changes</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info3.png"><img class="aligncenter size-large wp-image-840" title="Changing header, footer and adding a background affects the design alot" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info3-540x330.png" alt="Changing header, footer and adding a background affects the design alot" width="540" height="330" /></a></p>
<p style="text-align: justify;">Already coming closer, not? Lets concentrate now on the contents and the layout of the product information page it self</p>
<h3>Change the layout of the product information page</h3>
<p style="text-align: justify;">First we want to change the page structure, so we need to know how the various eements, like the image, description etc are placed. To visualize this, we just add stroong background colors to each &#8220;container&#8221;</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info4.png"><img class="aligncenter size-large wp-image-843" title="Using strong background colors to visualize the various areas of the product information page" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info4-540x330.png" alt="Using strong background colors to visualize the various areas of the product information page" width="540" height="330" /></a>Now that we can see each area clearly, lets move the product images area to the left and the description to the right. This is easy to do, just open your file catalog/product_info.php, find following line (2 times in the code) and change the &#8220;right&#8221; to be &#8220;left&#8221;</p>
<p style="text-align: justify;">
<pre class="brush:xml">    &lt;div id="piGal" style="float: right;"&gt;</pre>
<p>It&#8217;s however recommended to not use inline styles but to add any rules to your css file.</p>
<p>We also move the &lt;h1&gt; area (holding the product name and price) and the button area to be on the right of the product image.</p>
<p>That is how it looks</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info5.png"><img class="aligncenter size-large wp-image-844" title="Moving the product image to the left" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info5-540x303.png" alt="Moving the product image to the left" width="540" height="303" /></a>Next thing we want to do is, to move the additional images to be on the left of the main image and not under it. That&#8217;s also not hard to do, instructions are on the <a href="http://bxslider.com/" target="_blank">bx slider</a> site, that is the script that osCommerce use to create the image gallery. Also important, to make the correct settings for the sizes of the main and additional images. They are done directly in file catalog/product_info.php, the default settings look like this, you need to change them according to the image sizes you plan to use</p>
<pre class="brush:xml">&lt;script type="text/javascript"&gt;
$('#piGal ul').bxGallery({
  maxwidth: 300,
  maxheight: 200,
  thumbwidth: &lt;?php echo (($pi_counter &gt; 1) ? '65' : '0'); ?&gt;,
  thumbcontainer: 300,
  load_image: 'ext/jquery/bxGallery/spinner.gif'
});
&lt;/script&gt;</pre>
<p style="text-align: justify;">An other thing to do is to get the &#8220;social bookmarks&#8221; directly into the body of the product information page.  I wrote a separate post about how to do this, please read here about how to<a title="Move social bookmarks to the product page in osCommerce" href="http://multimixer.gr/26/07/2011/move-social-bookmarks-to-the-product-information-page/"> move social bookmarks to the body product information page in oscommerce</a></p>
<p style="text-align: justify;">I also reorganized the way the information is getting displayed like price, add to cart button etc. The add to cart button is still the default, this will change later after the general button style is decided.</p>
<p>Let&#8217;s check how things look now</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info6.png"><img class="aligncenter size-large wp-image-845" title="Additional images moved to the left of the main image" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info6-540x280.png" alt="Additional images moved to the left of the main image" width="540" height="280" /></a></p>
<p style="text-align: justify;">Next thing will be to add &#8220;related products&#8221;, that is an area to show any cross- or up-sell items of a product. There is an addon existing for this in osCommerce, called &#8220;<a href="http://addons.oscommerce.com/info/2293" target="_blank">optional related products</a>&#8220;. This need of course to be upgraded to work with version 2.3.1 of osCommerce. Also the way the product information get printed to the screen, need to be adjusted to the particular layout. An other layout, than the one shown here, is posted <a href="http://multimixer.gr/18/03/2011/equal-height-for-oscommerce-product-listing-boxes/">here</a> and also used live on <a href="http://harlemflowers.com/boutique/product_info.php?products_id=47" target="_blank">this site</a></p>
<p style="text-align: justify;">However, in this case we need just the related product images to be dispayed, all other info will appear as a toltip upon hover, or in a &#8220;jquery dialog&#8221; upon click, I&#8217;m not sure yet. After adding this, the website look like this</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info7.png"><img class="aligncenter size-large wp-image-847" title="Related products on the product information page of osCommerce" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info7-540x280.png" alt="Related products on the product information page of osCommerce" width="540" height="280" /></a></p>
<p style="text-align: justify;">We are more or less done with the layout. Lets remove the help background colors and replace them by semi transparent rgba colors (for IE we will use png images) and that is how everything look like now</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info8.png"><img class="aligncenter size-large wp-image-848" title="The new styled osCommerce product information page" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info8-540x280.png" alt="The new styled osCommerce product information page" width="540" height="280" /></a></p>
<p style="text-align: justify;">There are still more things to do of course, like to improve the page functionality: I don&#8217;t want the various links  (like &#8220;ask a question about this product&#8221; or &#8220;reviews&#8221; etc) to lead to other pages, I don&#8217;t think that it is a good idea to let customers leave the product information page (except of course towards checkout), so all this information need to pop up within the product information page. For this I&#8217;m going to use either one of the existing scripts (the jQuery UI dialog or a fancybox style) or something totally different</p>
<p style="text-align: justify;">After doing some smaller changes, and after adding the real products and real images, here is how the product information page look like</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info_1.jpg"><img class="aligncenter size-large wp-image-1034" title="Product information page in oscommerce" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info_1-540x368.jpg" alt="Product information page in oscommerce" width="540" height="368" /></a></p>
<p>What is new here, compared to the previous &#8220;version&#8221;?</p>
<p style="text-align: justify;"><strong>Option types:</strong> That are the radio buttons that let users to select the iPhone model they use. For this I used the addon &#8220;<a href="http://addons.oscommerce.com/info/6818" target="_blank">option types v2</a>&#8221; that I modified a little to work with osCommerce version 2.3.1. Additionally I added some more improvements made by me, like the ability to add short and long option descriptions etc. Unfortunately, I didn&#8217;t found time to upload a new version of the addon, all information is posted however at the <a href="http://forums.oscommerce.com/topic/338661-contribution-option-types-v2/page__st__520" target="_blank">osCommerce forum</a></p>
<p><a href="http://forums.oscommerce.com/topic/338661-contribution-option-types-v2/page__st__520" target="_blank"></a>Here is an example of how the option description pop up window look like</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info_3.jpg"><img class="aligncenter size-large wp-image-1036" title="Option description pop up in osCommerce" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info_3-540x368.jpg" alt="Option description pop up in osCommerce" width="540" height="368" /></a></p>
<p style="text-align: justify;">An other &#8220;new&#8221; thing is the &#8220;<strong>ask a question</strong>&#8221; feature, that enables store customers to send a question about that product to the store owner without having to leave the product information page. I think there are some addons available that promise to do this, I preferred however to create the functionality by my self from scratch.</p>
<p style="text-align: justify;">I will make a separate post about this, for now just to say that what I did was, to create an ordinary form, same/similar to the contact us form of the default osCommerce, include it into file product_info.php, wrap it into a div and link to that div using fancybox, you can read more about at the <a href="http://fancybox.net/howto" target="_blank">fancybox usage instructions</a></p>
<p style="text-align: justify;">Additionally I added the image of the product in question to the left and a jQuery valitadition. This is how the screen look like after pressing the &#8220;ask a question&#8221; link</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info_2.jpg"><img class="aligncenter size-large wp-image-1038" title="Ask a question contact form within the osCommerce product info page" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info_2-540x368.jpg" alt="Ask a question contact form within the osCommerce product info page" width="540" height="368" /></a></p>
<p>An oer issue that had to be solved was the space issue. As you can see the text side of the product info page has the same height as the image side, so the text is limited by this. It appeared now the case, that some products needed some extra text, and there was absolutely no space for this.</p>
<p>One way was to add a scrollbar  to the product description it self. This is technically easy, by adding an &#8220;overflow:auto&#8221; to the &lt;div&gt; that wraps the product description, but the result is really very ugly:</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info_scrollbar.jpg"><img class="aligncenter size-large wp-image-1046" title="Adding a scrollbar to accommodate longer descriptions is not nice" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info_scrollbar-540x283.jpg" alt="Adding a scrollbar to accommodate longer descriptions is not nice" width="540" height="283" /></a></p>
<p style="text-align: justify;">What to do then? Since the additional text is related to the images, why not to add it over the images and make it appear upon hover? This is what I decided to do, but how to implement? Not all products have this extra note, and the text can be different from product to product.</p>
<p style="text-align: justify;">Someone would say to go on as follows: Make a new field in the database for the extra text, an input filed in admin to enter this text, then change the query in product_info.php to get this text, and finally modify the file one more time to display it. Such a trouble !</p>
<p style="text-align: justify;">I did something totally different, using jQuery. Since we have it in osCommerce why not to use it? The particulat jQuery method to use is <a href="http://api.jquery.com/append/" target="_blank">append()</a> Using this, all I had to do is to type in the text into the product description, wrap my extra text into a &lt;div&gt;, give to that &lt;div&gt; an id, eg &lt;div id=&#8221;kuku&#8221;&gt; and then, using append() to move that &lt;div&gt; from its original place (the description) to the &lt;ul&gt; that holds the large image. To get the hover effect all you need is some css, there are many tutorials all over</p>
<p>Here is how it look like upon hover over the image:</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_info_4.jpg"><img class="aligncenter size-large wp-image-1047" title="Extra text over the main image using jQuery" src="http://multimixer.gr/wp-content/uploads/2011/05/product_info_4-540x285.jpg" alt="Extra text over the main image using jQuery" width="540" height="285" /></a></p>
<h3>Index pages: Product listing, category listing and home page</h3>
<p style="text-align: justify;">Next step is to do something about the homepage and the product and category listing pages. In osCommerce product listing and categories listing happens on the index page. This may be a little confusing, because usually we call &#8220;index&#8221; the &#8220;home&#8221; page. However, in osCommerce, the index page has 3 &#8220;cases&#8221;:</p>
<ul>
<li>case to list subcategories</li>
<li>case to list products</li>
<li>Case not to list anything, that case is if no &#8220;cPath&#8221; is given, that is the so called &#8220;front-&#8221; or &#8220;home-&#8221; page</li>
</ul>
<p>That &#8220;cases&#8221; are clearly to indentify in your catalog/index.php file, and look like this:</p>
<pre class="brush:php">  if ($category_depth == 'nested') {
.
here we have subcategory listing
.

  } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
.
Here we have product listing
.

  } else { // default page
.
here we dont have anything = front page
.
  }</pre>
<h4>Index page: listing subcategories in a simple grid</h4>
<p style="text-align: justify;">This is the first &#8220;case&#8221; we will start with. The file we will work on is catalog/index.php and particularly the section that starts with</p>
<p style="text-align: justify;">
<pre class="brush:php">  if ($category_depth == 'nested') {</pre>
<p>You will find this at line about 37 in a default index.php file and the default output look like this</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/subindex1.jpg"><img class="aligncenter size-large wp-image-871" title="The default way of subcategory listing on the index page" src="http://multimixer.gr/wp-content/uploads/2011/05/subindex1-540x452.jpg" alt="The default way of subcategory listing on the index page" width="540" height="452" /></a></p>
<p>First thing we activate our template, the one we are working on, and now it looks like this</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/subindex2.jpg"><img class="aligncenter size-large wp-image-872" title="Subcategory listing with activated template" src="http://multimixer.gr/wp-content/uploads/2011/05/subindex2-540x532.jpg" alt="Subcategory listing with activated template" width="540" height="532" /></a></p>
<p style="text-align: justify;">There is not really much to do here, things look almost ok. I&#8217;ll do following:</p>
<p style="text-align: justify;">Disable the new products module. Very easy to do, in the file, at line about 88, comment out the new products module &#8220;inclusion&#8221; like this</p>
<p style="text-align: justify;">
<pre class="brush:php">&lt;?php //include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?&gt;</pre>
<p>Next, I will remove any borders and make the subcategory name to be placed on the image and not under it. The part of the file to work on is this here (line about 73)</p>
<pre class="brush:php">      echo '        &lt;td align="center" class="smallText" width="' . $width . '" valign="top"&gt;&lt;a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '"&gt;' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '&lt;br /&gt;&lt;/a&gt;&lt;a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '"&gt;' . $categories['categories_name'] . '&lt;/a&gt;&lt;/td&gt;' . "\n";</pre>
<p style="text-align: justify;">What I will do is to place the contents of the &lt;td&gt; into 2 nested &lt;div&gt;, the first one will get the full &lt;td&gt; width and will be used to add a background, the second one will be positioned relative and will get the width of the image and will be used as a wrapper for the next element, an absolute positioned &lt;p&gt;, wrapped by the 2 div&#8217;s that will hold the category name</p>
<p style="text-align: justify;">Final step is to adjust the subcategory image size, this I do in the administration panel under admin&gt;configuration&gt;images. Number of items per row can be set under admin&gt;maximum values&gt;Categories To List Per Row</p>
<p style="text-align: justify;">The rest is a few lines of css to set margin and padding for the elements and to choose the background colors that will be again set as semi transparent rgba colors. I do also play a little with opacity values, so I can get a nice effect upon hover. For browsers that support transitions, there will be also a small delay in the effects</p>
<p style="text-align: justify;">That&#8217;s how the site look like now</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/subindex4.jpg"><img class="aligncenter size-large wp-image-873" title="The final result for listing subcategories on the osCommerce index page" src="http://multimixer.gr/wp-content/uploads/2011/05/subindex4-540x335.jpg" alt="The final result for listing subcategories on the osCommerce index page" width="540" height="335" /></a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">On hover over any subcategory, opacity values change and it look like this</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/subindex4_hover.jpg"><img class="aligncenter size-large wp-image-874" title="Subcategory listing hover effect" src="http://multimixer.gr/wp-content/uploads/2011/05/subindex4_hover-540x335.jpg" alt="Subcategory listing hover effect" width="540" height="335" /></a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">
<p>Because I&#8217;m not sure yet about the image ratio that will be used, I created 2 more subcategory listing layouts, one with a dark background and one on a white background.</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/subindex_alt1.jpg"><img class="aligncenter size-large wp-image-892" title="An alternative listing of subcategories on a dark semi transparent background" src="http://multimixer.gr/wp-content/uploads/2011/05/subindex_alt1-540x293.jpg" alt="An alternative listing of subcategories on a dark semi transparent  background" width="540" height="293" /></a></p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/subindex_alt2.png"><img class="aligncenter size-large wp-image-893" title="The same listing on a white background. It all depends on the images to be used" src="http://multimixer.gr/wp-content/uploads/2011/05/subindex_alt2-540x293.png" alt="The same listing on a white background. It all depends on the images to be used" width="540" height="293" /></a></p>
<p>To switch from one listing layout to an other is quite simple, all that I needed to do is to change the number of &#8220;categories to list per row&#8221; under admin&gt;configuration&gt;maximum values and the subcategory image size of course under admin&gt;configuration&gt;images.</p>
<p>The colors can be set and changed by modifying a couple of lines in stylesheet.css</p>
<p>The final subcategory listing section of the index page, using the real product images look like this. The category name appear upon hover over the image</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/05/category_listing.jpg"><img class="aligncenter size-large wp-image-1023" title="subcategory listing in osCommerce: Category name upon hover" src="http://multimixer.gr/wp-content/uploads/2011/05/category_listing-540x284.jpg" alt="subcategory listing in osCommerce: Category name upon hover" width="540" height="284" /></a></p>
<h4>Index page: Product listing using bxGallery</h4>
<p style="text-align: justify;">The osCommerce product listing page (index,php for &#8220;case&#8221; products) looks by default like this.</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/listing1.jpg"><img class="aligncenter size-large wp-image-876" title="Default product listing in osCommerce" src="http://multimixer.gr/wp-content/uploads/2011/05/listing1-540x409.jpg" alt="Default product listing in osCommerce" width="540" height="409" /></a></p>
<p style="text-align: justify;">After activating the template, we see that the &#8220;body&#8221; of the listing remain almost the same. How it comes? It has the css class &#8220;.ui-widget-content&#8221; and since we didn&#8217;t change the ui theme yet, the result looks same.</p>
<p style="text-align: justify;">Before changing anything in colors and backgrounds, we want to change the way of product listing. The default osCommerce way is maybe suitable for stores with many products and very practical, since it gives a fast overview, but, in this case here, it doesn&#8217;t match the whole design.</p>
<p style="text-align: justify;">How and where to change this? The file to work on is catalog/includes/modules/product_listing.php This one get included into the index.php file in &#8220;category_depth&#8221; products, at about line 238</p>
<p style="text-align: justify;">
<pre class="brush:php">    include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);</pre>
<p style="text-align: justify;">All data get collected in index.php, product_listing.php is responsible for the display. That mean that, if you want to have any other data displayed on your product listing, you need to make sure this data is taken from the database in index.php and then you can decide how to display it modifying this file here.</p>
<p style="text-align: justify;">What we want to do is to change the listing style completely, to turn it into a &#8220;gallery&#8221; style. Since osCommerce has already the very nice <a title="http://bxgalleryplugin.com/" href="http://" target="_blank">bxGallery</a> script (by  <a href="http://stevenwanderski.com/" target="_blank">Steven Wanderski</a>) installed, there is no reason to look for an other one.</p>
<p style="text-align: justify;">bxGallery must be applied to an html unordered list, so, first thing is to change the table structure of product_listing.php into an unordered list. (An &#8220;unordered list&#8221; is a list created by &lt;ul&gt;&lt;li&gt; etc oposite to the &#8220;ordered list&#8221;, that means numbered, that is like &lt;ol&gt;&lt;li&gt; etc)</p>
<p style="text-align: justify;">After doing this, the file looks like this (in a simplified form)</p>
<p style="text-align: justify;">
<pre class="brush:applescript"> echo '&lt;div id="liGal"&gt;&lt;ul class="mainImage" &gt;' . "\n";

    $pi_counter = 0;
    while ($listing = tep_db_fetch_array($listing_query)) {
    $pi_counter++;

            $pi_entry = '&lt;li&gt;';

	$pi_entry .= '&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&amp;' : '') . 'products_id=' . $listing['products_id']) . '"&gt;' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'] . '&lt;/a&gt;';

            $pi_entry .= '&lt;/li&gt;';

    } // end while ($listing = tep_db_fetch_array($listing_query)) {

    echo '&lt;/ul&gt;&lt;/div&gt;';</pre>
<p style="text-align: justify;">To say the truth, all you need to do is, to look how it is done in product_info.php that use the same gallery. You can of course add anything you want into each &lt;li&gt;&lt;/li&gt;, in the example above it is just the image. I will add also the name, price, buttons etc, wrapping everything into &lt;p&gt; within the &lt;li&gt;.</p>
<p style="text-align: justify;">If you want to keep the admin settings, about what to show on the listing, you can use the switch/case structure that exist in the file, just make sure you replace the table structure by &lt;div&gt;&#8217;s or anything that suit your needs</p>
<p style="text-align: justify;">Do not forget to add this after your list is done</p>
<p style="text-align: justify;">
<pre class="brush:java">&lt;script type="text/javascript"&gt;
$('#liGal ul').bxGallery({
  maxwidth: 375,
  maxheight: 375,
  thumbwidth: 185,
  thumbcontainer: 565,
  thumbplacement: 'left',
  opacity: .7,
  load_image: 'ext/jquery/bxGallery/spinner.gif'
});
&lt;/script&gt;</pre>
<p style="text-align: justify;">You can find more information and setting options on the <a href="http://bxgalleryplugin.com/" target="_blank">bxGallery</a> site. However, hat are the settings I used to create a list like on the image below</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/listing5_left.jpg"><img class="aligncenter size-large wp-image-879" title="A new styled product listing in osCommerce based on bxGallery" src="http://multimixer.gr/wp-content/uploads/2011/05/listing5_left-540x303.jpg" alt="A new styled product listing in osCommerce based on bxGallery" width="540" height="303" /></a></p>
<p style="text-align: justify;">All products of a category are listed in &#8220;thumbnails&#8221;, upon hover the main image on the left change. This is what the installed gallery script do</p>
<p style="text-align: justify;">Upon hover over the main image, a short product description and the &#8220;buy now&#8221; and &#8220;details&#8221; buttons appear.</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/listing5_left_hover.jpg"><img class="aligncenter size-large wp-image-880" title="Additional information and buttons upon hover" src="http://multimixer.gr/wp-content/uploads/2011/05/listing5_left_hover-540x303.jpg" alt="Additional information and buttons upon hover" width="540" height="303" /></a></p>
<p style="text-align: justify;">I&#8217;m not absolutely sure if I maybe prefer the large image to be on the right, that is easy to change by changing the thumbplacement: &#8216;right&#8217;, to be thumbplacement: &#8216;left&#8217;, in the bxSlider settings</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/listing5_right.jpg"><img class="aligncenter size-large wp-image-878" title="The large image on the right, functionality is same" src="http://multimixer.gr/wp-content/uploads/2011/05/listing5_right-540x303.jpg" alt="The large image on the right, functionality is same" width="540" height="303" /></a></p>
<p style="text-align: justify;">Tell me what you like more, left or right? I really can not decide</p>
<p style="text-align: justify;">An issue I had to solve here was that, the thumbnails generated by bxGallery are not links, they can not be clicked, or let&#8217;s say, if clicked they only change the main image. Here I did a temporary fix, I&#8217;m not posting it because it&#8217;s not very &#8220;elegant&#8221; and it also requires changes to the bx gallery script it self, so I think it will cause more questions than necessary.</p>
<h4>Index page: product listing in a grid</h4>
<p style="text-align: justify;">Well, finally I decided to go with a much more simple and &#8220;lightweight&#8221; listing in a grid style, that looks like this</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/product_listing.jpg"><img class="aligncenter size-large wp-image-1025" title="product listing in osCommerce in grid style" src="http://multimixer.gr/wp-content/uploads/2011/05/product_listing-540x280.jpg" alt="product listing in osCommerce in grid style" width="540" height="280" /></a></p>
<p style="text-align: justify;">Things are much more easy here, than in the bx gallery case. All you have to do is, to modify the code of file includes/modules/product_listing.php to create a &lt;td&gt; for each product instead of a &lt;tr&gt; as per default. Within this &lt;td&gt; you can add any information you like, such as name, price etc. This I wrapped all into &lt;p&gt;, that are the &lt;td&gt; of the original file.</p>
<p style="text-align: left;">Next thing to do will be, to copy the &#8220;logic&#8221; of the products to display per row for example from the new products module, that is located in file catalog/includes/modules/new_products.php</p>
<p style="text-align: justify;">In case you are a mini template system user, there are good news: This all and much more will be included into version 1.4 that will be released soon, so you can make all adjustments from your administration panel.</p>
<h4>Index page: Front page with banners</h4>
<p style="text-align: justify;">We all know the default osCommerce frontpage, showing the new products and the famous&#8221;welcome guest&#8221; message</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/front_1.jpg"><img class="aligncenter size-large wp-image-883" title="The osCommerce front page and the famous &quot;welcome guest&quot; message" src="http://multimixer.gr/wp-content/uploads/2011/05/front_1-540x372.jpg" alt="The osCommerce front page and the famous &quot;welcome guest&quot; message" width="540" height="372" /></a></p>
<p style="text-align: justify;">To show new products may be fine, depending on the store, but <strong>the &#8220;welcome message&#8221; is something that need&#8217;s to be removed in any case and for every price. People do not visit online stores to login or to create accounts</strong>, so, if you still have this on your store, remove it asap !</p>
<p style="text-align: justify;">Having <a href="http://minitemplatesystem.com/" target="_blank">mini template system</a> installed, it get really easy to configure the front page. Using the <a href="http://minitemplatesystem.com/usage/front-page-manager-oscommerce/" target="_blank">front page manager</a> and the <a href="http://minitemplatesystem.com/usage/banner-manager-oscommerce/" target="_blank">banner manager</a> we can configure the front page very quickly without having to modify any file at all. <span style="font-size: 0.8em;">(please note that mini template system is a commercial addon for osCommerce, do not click the link if you are not interested in anything that is not free and keep on reading here)</span></p>
<p style="text-align: justify;">We are going to use the 2 banner modules, the first one to display a large image and message, the second one can be used to promote featured products or specials or anything. I won&#8217;t get to much busy with the content, since this is very easy to manage and change by the store owner himself.</p>
<p style="text-align: justify;">That&#8217;s how our front page look like after a few clicks in the admin panel</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/front_3.jpg"><img class="aligncenter size-large wp-image-884" title="The new front page done in the administration panel" src="http://multimixer.gr/wp-content/uploads/2011/05/front_3-540x322.jpg" alt="The new front page done in the administration panel" width="540" height="322" /></a></p>
<p style="text-align: justify;">Well, finally, the front page includes just 1 banner slider and look like this</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/front_page.png"><img class="aligncenter size-large wp-image-1032" title="The final front page of the new osCommerce store: Simple and clean" src="http://multimixer.gr/wp-content/uploads/2011/05/front_page-540x280.png" alt="The final front page of the new osCommerce store: Simple and clean" width="540" height="280" /></a></p>
<p style="text-align: justify;">This is however the easiest part of the whole design process, technically I mean. The hard part is to get the right inspiration :-)</p>
<p style="text-align: justify;">As said, this is all done using mini template system. Let&#8217;s see what you would need to do in case you don&#8217;t use it. The file we need to work on is index.php and concrete the last &#8220;section&#8221; of it that starts at about line 244 in a default osCommerce installation and look like this</p>
<p style="text-align: justify;">
<pre class="brush:xml">  } else { // default page
?&gt;

&lt;h1&gt;&lt;?php echo HEADING_TITLE; ?&gt;&lt;/h1&gt;

&lt;div class="contentContainer"&gt;
  &lt;div class="contentText"&gt;
    &lt;?php echo tep_customer_greeting(); ?&gt;
  &lt;/div&gt;

&lt;?php
    if (tep_not_null(TEXT_MAIN)) {
?&gt;

  &lt;div class="contentText"&gt;
    &lt;?php echo TEXT_MAIN; ?&gt;
  &lt;/div&gt;

&lt;?php
    }

    include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);
    include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?&gt;

&lt;/div&gt;

&lt;?php
  }</pre>
<p>Here you can basically delete everything, so that this area of the file look like this</p>
<pre class="brush:xml">  } else { // default page
?&gt;

&lt;div class="contentContainer"&gt;
  &lt;div class="contentText"&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;?php
  }</pre>
<p style="text-align: justify;">You are free now to add anything you want into here, this is plain html and you can do whatever you want, no limitation. If you want for example to add a slider, there are many nice jQuery based sliders around, I personally would use <a href="http://www.bxslider.com/" target="_blank">bxSlider</a> as I did for mini template system. However, here is an other <a href="http://www.1stwebdesigner.com/css/fresh-jquery-image-gallery-display-solutions/" target="_blank">slider overview</a>, but please do not feel limited to this, there are for sure more.</p>
<p style="text-align: justify;">Most, if not all, of them will require to make an unordered list (&lt;ul&gt;&lt;li&gt;) of the images you want to display. Some others allow also some text, however each slider has it&#8217;s own specific setup. What you need to do is to add the unordered list into the &lt;div&gt; structure left in index.php, link to each image separately and of course make sure the images are on the server and the path to them is correct.</p>
<p style="text-align: justify;">Finally you will need to add the new script files and link to them in includes/template.top.php</p>
<p style="text-align: justify;">If you want to have new products, or upcomming products or any other module you may have installed, you can add it to here like this for the new products</p>
<pre class="brush:xml">&lt;?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?&gt;</pre>
<p style="text-align: justify;">If you want to style this module too, you need to do it in its file, for example the file that displays the new products is catalog/includes/modules/new_products.php</p>
<p>So, we are done with the front page, not so hard, not? Next step is no make the main navigation menu on top.</p>
<h3>The header and the main navigation</h3>
<p>This is something that I left for the end, for sure you noticed that on the final images, the header is already there. Here is how I did it</p>
<p style="text-align: justify;">First of all to say that, even the main navigation is in the header, I didn&#8217;t modify the file that holds the header information at all ! Well, this is because of mini template system, if you have the default osCommerce, you will need to do a couple of changes to the file includes/header.php</p>
<p style="text-align: justify;"><a href="http://multimixer.gr/wp-content/uploads/2011/05/headet.jpg"><img class="aligncenter size-large wp-image-1053" title="The header of the new osCommerce store" src="http://multimixer.gr/wp-content/uploads/2011/05/headet-540x162.jpg" alt="The header of the new osCommerce store" width="540" height="162" /></a></p>
<p>The header section consist of 3 elements: The logo, the main &#8220;slogan&#8221; on the right and the menu under it</p>
<ul>
<li>The <strong>logo</strong> is easy, just upload it under admin&gt;configuration&gt;store logo. That&#8217;s all</li>
<li style="text-align: justify;">The <strong>slogan</strong>, at the top right is in real a banner. Instead of an image, I typed in my text into the &#8220;html&#8221; textarea in admin&gt;tools&gt;banner manager. I added this banner to banner group &#8220;my_theme_name_header&#8221;.The first row is a &lt;h2&gt; tag, the second one a &lt;h3&gt;. The rest is css styling</li>
<li style="text-align: justify;">To set up the <strong>menu</strong>, I created a link group using mini template systems <a title="link manager for osCommerce" href="http://minitemplatesystem.com/usage/link-manager-oscommerce/" target="_blank">link manager</a> and enabled the <a title="Menu maker for osCommerce" href="http://minitemplatesystem.com/usage/menu-maker-horizontal-drop-down-navigation-menu/" target="_blank">main navigation</a> bar setting it to display my just created link group.</li>
</ul>
<p style="text-align: justify;">That was all. Lets see now what I had to do if not using mini template system. Here is a <a title="osCommerce header layout" href="http://multimixer.gr/25/11/2010/make-a-nice-header-for-your-store-in-oscommerce-version-2-3-1/">useful article</a> to read, that explain the osCommerce header structure. If you want such a header, what you need to do in file catalog/includes/header.php is</p>
<ul>
<li>replace the contents of &lt;div id=&#8221;headerShortcuts&#8221;&gt; by the banner code. You will find such a code example in file catalog/includes/footer.php Choose a link group name and add the content to that group via admin, same as I did before</li>
<li>Strip out the complete breadcrumb section and replace it by your menu. I&#8217;m sorry, but I can&#8217;t go into details here about how to create such a menu, maybe there is something in the osCommerce addons area, I&#8217;m not sure. As a general orientation, you need to get your categories structure into an unordered list (there is an addon for this) and then apply a script to create the dropdowns, what I use is superfish, but there are others too.</li>
</ul>
<h3></h3>
<h3>Additional information</h3>
<p>I used a custom ui widget theme to fit the needs of the template. This I created using <a href="http://jqueryui.com/themeroller/" target="_blank">themeroller</a>, all I had to do was to install it, you can read here about <a title="new theme osCommerce" href="http://multimixer.gr/02/12/2010/how-to-get-a-new-theme-for-your-oscommerce-store/">how to install a new theme</a> to your osCommerce store</p>
<p>I used also custom fonts for the header section and all page headings, you can <a title="using @font face in osCommerce" href="http://multimixer.gr/21/06/2011/font_face_oscommerce/">read here</a> about how to do this</p>
<p style="text-align: justify;">Well, people, I maybe forgot to mention some things I did, feel free to ask. I&#8217;m sorry for not going into detail in some things, the post would be too long, it is already long, I&#8217;ll try to cover particular issues in separate posts. Target of this post is finally to give you inspiration and not to teach you each technique step by step</p>
<h3>Conclusion</h3>
<p>Files that I had to modify (starting from a default osCommerce 2.3.1 store and without mini template system in use) are</p>
<ul>
<li>stylesheet.css</li>
<li>index.php</li>
<li>product_info.php</li>
<li>includes/template_top.php</li>
<li>includes/header.php</li>
<li>includes/footer.php</li>
<li>includes/modules/product_listing.php</li>
</ul>
<p style="text-align: justify;"><strong><span style="text-decoration: underline;">Total = 7  files</span></strong><span style="text-decoration: underline;">. </span></p>
<p style="text-align: justify;">Please realize that changing just 7 files changed the overall look of the store completely. Consider this when you are planning to purchase a template and ask (before buying) how many files will need to be modified or replaced by he template. Most of the poorly coded templates will require a complete reinstallation of osCommerce. A properly coded template will not require changes to more than 10 files, something aroud 5 to 10 files. Also to say that, if using mini template system most of the files don&#8217;t need to be modified at all.</p>
<p style="text-align: justify;">The store is live and you can visit it if you like here <a title="Custom handmade titanium backcovers" href="http://maselements.com/" target="_blank">Mas Design</a> Feel free to browse around and to check whatever I posted here. Please do not make any test orders because the store is live, I guess that real orders are welcome of course, I can only say that this titatium backcovers are really a nice thing.</p>
<p style="text-align: justify;">Enjoy</p>
<p style="text-align: justify;">PS Please do not ask me to send you this template. I&#8217;m not selling it and not giving it in any form. This is a custom work, the design and layout are unique, the store owner participated him self at many stages of the design process, making images, suggestions, giving ideas etc. So, there will be no second exactly same store. If you need a custom store, you can get in touch of course, I&#8217;ll be happy to discuss any details with you, but please don&#8217;t ask for exactly this one</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/16/05/2011/making-a-oscommerce-template-all-the-progress-step-by-step/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Equal height for osCommerce product listing boxes</title>
		<link>http://multimixer.gr/18/03/2011/equal-height-for-oscommerce-product-listing-boxes/</link>
		<comments>http://multimixer.gr/18/03/2011/equal-height-for-oscommerce-product-listing-boxes/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 08:24:33 +0000</pubDate>
		<dc:creator>multimixer</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[osCommerce v2.3]]></category>

		<guid isPermaLink="false">http://multimixer.gr/?p=774</guid>
		<description><![CDATA[What to do if you want an equal height for all your product listing boxes in osCommerce? Read here what I did using jQuery. It's a simple fast and clean solution, easy to use for anyone]]></description>
			<content:encoded><![CDATA[<p>I started recently to work on a cross/up sell feature. So, I created a new module that is showing cross sell and/or up sell items on the product information page in osCommerce. The whole thing is based on the existing <a href="http://addons.oscommerce.com/info/2293" target="_blank">related products</a> addon, that I had to modify of course to make it compatible with version 2.3.1.</p>
<p>What I&#8217;ve got is a box that display for each cross or up sell product it&#8217;s name, model, manufacturer, it&#8217;s image, part of the product description, price and quantity and the buttons &#8220;buy now&#8221; and &#8220;details&#8221;.</p>
<p>I won&#8217;t go into more details about this, the topic here is an other, it&#8217;s about the old and well known problem about <strong>how to get an equal height for each box.</strong></p>
<p>Here is an image of the problem. The background in in green on purpose to make the problem clear</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/03/problem1.png"><img class="aligncenter size-large wp-image-789" title="The problem: Boxes of different height in osCommerce product listings" src="http://multimixer.gr/wp-content/uploads/2011/03/problem1-540x284.png" alt="The problem: Boxes of different height in osCommerce product listing" width="540" height="284" /></a></p>
<p>You see that each product column has it&#8217;s own height and that doesn&#8217;t look nice at all. Even I&#8217;m using an example here for the product information page, you will face the same if you want to do similar listings for the index page or the new and specials modules.</p>
<p><strong>What to do now?</strong></p>
<p>To understand the following comments lets take a look on how this box is structured in a simplified form (I will leave out anything that is not related to the issue. The complete and real code will be available at the osCommerce addons soon anyway)</p>
<pre class="brush:xml">&lt;div class="outer"&gt;

  &lt;div class="inner"&gt;
    &lt;div class="heading"&gt;
      &lt;p&gt;name&lt;/p&gt;
      &lt;p&gt;model&lt;/p&gt;
      &lt;p&gt;manufacturer&lt;/p&gt;
    &lt;/div&gt;

    The image

    &lt;p class="description"&gt;description&lt;/p&gt;

    &lt;div class="buttons"&gt;
      &lt;p&gt;quantity&lt;/p&gt;
      &lt;p&gt;price&lt;/p&gt;
      &lt;p&gt;buttons&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="inner"&gt;
    &lt;div class="heading"&gt;
      &lt;p&gt;name&lt;/p&gt;
      &lt;p&gt;model&lt;/p&gt;
      &lt;p&gt;manufacturer&lt;/p&gt;
    &lt;/div&gt;

    The image

    &lt;p class="description"&gt;description&lt;/p&gt;

    &lt;div class="buttons"&gt;
      &lt;p&gt;quantity&lt;/p&gt;
      &lt;p&gt;price&lt;/p&gt;
      &lt;p&gt;buttons&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="inner"&gt;
    &lt;div class="heading"&gt;
      &lt;p&gt;name&lt;/p&gt;
      &lt;p&gt;model&lt;/p&gt;
      &lt;p&gt;manufacturer&lt;/p&gt;
    &lt;/div&gt;

    The image

    &lt;p class="description"&gt;description&lt;/p&gt;

    &lt;div class="buttons"&gt;
      &lt;p&gt;quantity&lt;/p&gt;
      &lt;p&gt;price&lt;/p&gt;
      &lt;p&gt;buttons&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;</pre>
<h4>1) Limit the number of characters used for the description</h4>
<p>Yes, this is done already. But even we set eg just 300 characters to be displayed, there is maybe a product with just 100 in it&#8217;s description. So we can set the limit to 100. But do we really want to limit all product descriptions, just because one of them has a short or no description?</p>
<p>So, that&#8217;s not a satisfying solution, at least not completelly</p>
<h4>2) Set a fixed height for the description.</h4>
<p>That is exactly what I was doing till now, to add to my stylesheet.css a fixed height for the element that containns the product description like this:</p>
<pre class="brush:css">.description {
  height:200px;
  min-height:200px;
}</pre>
<p><em>A side note: If you are copy pasting anything here, please be careful and use your own names for the css classes, or add an id to the whole container. It can be that the same names are used elsewhere in your site and this could cause problems</em></p>
<p>But again, is this solution a good one? I say no, or at least not 100%. I don&#8217;t like the idea that each time I want to change the length of my description I have to modify several files to make it look ok again</p>
<h4>3) Faux columns</h4>
<p>This is a well known technique, that can be realized in 2 ways: The one way is using background images (you can read here about <a href="http://www.clubosc.com/column-backgrounds-in-css.html" target="_blank">faux columns in osCommerce</a>) the other way is to <a href="http://www.positioniseverything.net/articles/onetruelayout/equalheight" target="_blank">faux using css</a>. Second solution I do use for example for the side columns of osCommerce</p>
<p>Do this solutions solve our problem? again, no. The image solution requires a fixed width, and we don&#8217;t know how many boxes there will be per row, the content is dynamic and can change any time.</p>
<p>What comes next? A google search and one more solution based on css</p>
<h4>4) The css way</h4>
<p>Here is the article I found that explain <a href="http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks" target="_blank">how to get equal height using css only</a>. Please take a look and then come back here.</p>
<p>Sounds great not? But again, we can not predict how many products we will have per row. So we don&#8217;t know exactly what classes to apply to where. Trying to create some logic to make all those percentage calculations, I really got a headache. Conclusion: This solution sounds good for a static html layout, but is not good for our purpose</p>
<p>Back again to google. This time some more solutions based on jQuery. From all results, I took 2 to try them out</p>
<h4>5) The jQuery way 1</h4>
<p>This solution, to set <a href="http://www.filamentgroup.com/lab/setting%5Fequal%5Fheights%5Fwith%5Fjquery/" target="_blank">equal heights with jQuery</a> comes from the same people who also did the <a href="http://jqueryui.com/themeroller/" target="_blank">themeroller </a>that we all use in osCommerce 2.3.1. Very promising, so lets try it out.</p>
<p><strong>First,</strong> we copy the script into a .js file and upload that file to the server. Lets say we call the file equalheight.js. You can place it into folder catalog/ext/jquery/ of your osCommerce installation</p>
<p><strong>Second,</strong> we link to that file. In file catalog/includes/template_top.php add just before the closing &lt;/head&gt; following line</p>
<pre class="brush:xml">&lt;script type="text/javascript" src="ext/jquery/equalheight.js"&gt;&lt;/script&gt;</pre>
<p><strong>Then,</strong> we go to the file we create the listing. This could be the file catalog/includes/modules/product_listing.php if you do something for the index page, or catalog/includes/new_pproducts.php if you alter the new products module, or whatever. Here we are going to use the simplified example posted above</p>
<p>We need to apply a css class or id to the outer element that contains the columns of our product listings, like this</p>
<pre class="brush:xml">&lt;div class="outer equalHeight"&gt;

  &lt;div class="inner"&gt;
    &lt;div class="heading"&gt;
      &lt;p&gt;name&lt;/p&gt;
      &lt;p&gt;model&lt;/p&gt;
      &lt;p&gt;manufacturer&lt;/p&gt;
    &lt;/div&gt;

    The image

    &lt;p class="description"&gt;description&lt;/p&gt;

    &lt;div class="buttons"&gt;
      &lt;p&gt;quantity&lt;/p&gt;
      &lt;p&gt;price&lt;/p&gt;
      &lt;p&gt;buttons&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="inner"&gt;
    ......
  &lt;/div&gt;

  &lt;div class="inner"&gt;
    ......
  &lt;/div&gt;

&lt;/div&gt;</pre>
<p><strong>Last step</strong> is to call the script in following way</p>
<pre class="brush:js">$('.equalHeight').equalHeights();</pre>
<p>The script will apply the height f the tallest direct child to all other direct children (in our example the div with class=&#8221;inner&#8221;).</p>
<p>The result look like this (the equal height area is marked orange</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/03/equal1a.png"><img class="aligncenter size-large wp-image-791" title="We come closer: We have boxes of equal height now" src="http://multimixer.gr/wp-content/uploads/2011/03/equal1a-540x284.png" alt="We come closer: We have boxes of equal height now" width="540" height="284" /></a></p>
<p>So, ok, we come closer. We see that the buttons section is not at the bottom, closest thought is to position it absolute into it&#8217;s relative positioned &#8220;inner&#8221; conteiner.</p>
<p>Our css look like this</p>
<pre class="brush:css">.inner {
  float:left;
  position:relative;
}
.buttons {
  position:absolute;
  bottom:0px;
}</pre>
<p><em>Again, copy pasters, please be careful with the class names, choose your own. Also, only the css related to the issue is shown here</em></p>
<p>And the result look like this</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/03/equal1b.png"><img class="aligncenter size-large wp-image-792" title="Absolute positioning of the buttons section: Not a real solution" src="http://multimixer.gr/wp-content/uploads/2011/03/equal1b-540x284.png" alt="Absolute positioning of the buttons section: Not a real solution" width="540" height="284" /></a></p>
<p><strong>What is now?</strong> The buttons section covers part of the description of the tallest element. Again a solution to this, to add some bottom margin to the description, that need to be equal to the height of the button section.</p>
<p>So, lets go, but&#8230; wait: Do we know this height? No we don&#8217;t because if depends on the content of the buttons area, and there can be a price or not, a quantity or not, the buttons themselves or not, according to the administration settings</p>
<p><strong>Conclusion:</strong> We came very close, but that&#8217;s also not exactly what we need.</p>
<p>Back to the google results. But first lets think again what our problem is: We have a description that is not equal in length for all items and we want to make the container (in our case the &lt;p class=&#8221;description&#8221;&gt; to have the same height. In other words: We need something to apply to the inner element (the description) directly.</p>
<p>Is there something? Yes there is !</p>
<h4>6) The jQuery way 2</h4>
<p>This solution about <a href="http://www.webringideas.com/web-development/divs-of-equal-height-using-jquery-script.html" target="_blank">divs of equal height using jQuery</a> script has one main difference to the previous. It apply to the inner element, and that&#8217;s exactly what we need</p>
<p>The procedure is the same as at point (5): Paste the script into a file, link to the file.</p>
<p>Then in the file we are working on we add a class to our &lt;p&gt; that contains the description as follows:</p>
<pre class="brush:xml">&lt;div class="outer"&gt;

  &lt;div class="inner"&gt;
    &lt;div class="heading"&gt;
      &lt;p&gt;name&lt;/p&gt;
      &lt;p&gt;model&lt;/p&gt;
      &lt;p&gt;manufacturer&lt;/p&gt;
    &lt;/div&gt;

    The image

    &lt;p class="description equalDesc"&gt;description&lt;/p&gt;

    &lt;div class="buttons"&gt;
      &lt;p&gt;quantity&lt;/p&gt;
      &lt;p&gt;price&lt;/p&gt;
      &lt;p&gt;buttons&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="inner"&gt;
    .....
  &lt;/div&gt;

  &lt;div class="inner"&gt;
    .....
  &lt;/div&gt;

&lt;/div&gt;</pre>
<p>Finally, we call the script in the same way as before, only difference the class name and the script name</p>
<pre class="brush:js">$(".equalDesc").setEqualHeight()</pre>
<p>and how does everything look like? (The description is now in orange)</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/03/equal2a.png"><img class="aligncenter size-large wp-image-793" title="The real solution: Equal height for the description only" src="http://multimixer.gr/wp-content/uploads/2011/03/equal2a-540x284.png" alt="The real solution: Equal height for the description only" width="540" height="284" /></a></p>
<p>Yes, that is it ! That&#8217;s the way to go. One more last image without the help colors</p>
<p><a href="http://multimixer.gr/wp-content/uploads/2011/03/final1.png"><img class="aligncenter size-large wp-image-794" title="The final result as it could appear on any website" src="http://multimixer.gr/wp-content/uploads/2011/03/final1-540x284.png" alt="The final result as it could appear on any website" width="540" height="284" /></a></p>
<p>Try it out and enjoy</p>
<p>I will try it out for the columns left and right now</p>
]]></content:encoded>
			<wfw:commentRss>http://multimixer.gr/18/03/2011/equal-height-for-oscommerce-product-listing-boxes/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
