<?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>MyCubeCart.com &#187; CubeCart 4 Tutorials</title>
	<atom:link href="http://mycubecart.com/tutorials/cubecart-4-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://mycubecart.com</link>
	<description>CubeCart Skins, Mods and Developer Ramblings.</description>
	<lastBuildDate>Fri, 05 Dec 2008 03:27:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google Checkout Button Background Color</title>
		<link>http://mycubecart.com/2008/11/29/google-checkout-button-background-color/</link>
		<comments>http://mycubecart.com/2008/11/29/google-checkout-button-background-color/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 06:56:52 +0000</pubDate>
		<dc:creator>Ron Edgecomb II</dc:creator>
				<category><![CDATA[CubeCart 3 and CubeCart 4 Tutorials]]></category>
		<category><![CDATA[CubeCart 4 Tutorials]]></category>
		<category><![CDATA[cubecart 4]]></category>
		<category><![CDATA[google checkout]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://mycubecart.com/2008/11/29/google-checkout-button-background-color-selector/</guid>
		<description><![CDATA[CubeCart 4 gives you the ability out of the box to allow your store to accept payments through Google Checkout. This is a great feature and one currently used here at MyCubeCart.com.
A small issued surfaced with the recent redesign of MyCubeCart.com. The Gooogle Checkout button had a white background, my content area did not. The [...]]]></description>
			<content:encoded><![CDATA[<p>CubeCart 4 gives you the ability out of the box to allow your store to accept payments through Google Checkout. This is a great feature and one currently used here at MyCubeCart.com.</p>
<p>A small issued surfaced with the recent redesign of MyCubeCart.com. The Gooogle Checkout button had a white background, my content area did not. The button looked out of place and I was pressed to find a solution. The Google Checkout API offers a handful of <a href="http://code.google.com/apis/checkout/developer/Google_Checkout_Basic_HTML_Google_Checkout_Buttons.html">button customization options</a>, a transparent background was one of them.</p>
<p>After digging around in the code a bit, I was pleasantly surprised to see that CubeCart was for the most part aligned to receive the type of customization I was after. A few small updates later, I had my transparent button.</p>
<p>Here&#8217;s how I did it.<br />
<span id="more-44"></span><br />
This modification requires the alteration of the following CubeCart 4 files:</p>
<ol>
<li>cubecart root/modules/altCheckout/Google_Checkout/admin/index.inc.php</li>
<li>cubecart root/modules/altCheckout/Google_Checkout/button.php</li>
</ol>
<h2>Part 1 &#8211; All Versions CubeCart 4.2.x &#8211; 4.3.0</h2>
<p>1. Open index.inc.php in a text, html or php editor.</p>
<p>2. Find:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>93
94
95
96
97
98
99
100
101
102
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">  &lt;tr&gt;
    &lt;tr&gt;
    &lt;td align=&quot;left&quot; class=&quot;tdText&quot;&gt;&lt;strong&gt;Button size:&lt;/strong&gt;&lt;/td&gt;
    &lt;td class=&quot;tdText&quot;&gt;
	&lt;select name=&quot;module[size]&quot;&gt;
      &lt;option value=&quot;large&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$module</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;large&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;selected='selected'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;Large&lt;/option&gt;
      &lt;option value=&quot;medium&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$module</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;medium&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;selected='selected'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;Medium&lt;/option&gt;
	  &lt;option value=&quot;small&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$module</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;small&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;selected='selected'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;Small&lt;/option&gt;
    &lt;/select&gt;&lt;/td&gt;
  &lt;/tr&gt;</pre></td></tr></table></div>

<p>3. Add immediately after:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>103
104
105
106
107
108
109
110
111
112
113
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;!-- BEGIN: MyCubeCart.com Mod --&gt;
  &lt;tr&gt;
    &lt;tr&gt;
    &lt;td align=&quot;left&quot; class=&quot;tdText&quot;&gt;&lt;strong&gt;Button Background Color:&lt;/strong&gt;&lt;/td&gt;
    &lt;td class=&quot;tdText&quot;&gt;
	&lt;select name=&quot;module[bgcolor]&quot;&gt;
      &lt;option value=&quot;white&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$module</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bgcolor'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;white&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;selected='selected'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;White&lt;/option&gt;
      &lt;option value=&quot;trans&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$module</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bgcolor'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;trans&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;selected='selected'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;Transparent&lt;/option&gt;
    &lt;/select&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;!-- END: MyCubeCart.com Mod --&gt;</pre></td></tr></table></div>

<p>4. Save file and upload.</p>
<h2>Part 2 &#8211; All Versions CubeCart 4.2.x &#8211; 4.3.0</h2>
<p>1. Open button.php in a text, html or php editor.</p>
<p>2. Find (line 167 or 168, determined by version):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>168
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #b1b100;">return</span> <span style="color: #000088;">$cart</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>CheckoutButtonCode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$module</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>3. Replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>168
169
170
171
172
173
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// BEGIN: MyCubeCart.com Mod</span>
            <span style="color: #b1b100;">return</span> <span style="color: #000088;">$cart</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>CheckoutButtonCode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$module</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$module</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bgcolor'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">/* Replaced
            return $cart-&amp;gt;CheckoutButtonCode($module['size']);
*/</span>
<span style="color: #666666; font-style: italic;">// END: MyCubeCart.com Mod</span></pre></td></tr></table></div>

<p>4. Save file and upload.</p>
<h3>Modification Complete!</h3>
<p>To use this feature, login to your CubeCart 4 control panel. Under the Modules heading, click on Alternate Checkouts. From here you will click the configure link next to the Google Checkout logo.</p>
<p>You will see a list of options for configuring this module. You will now have a dropdown menu in place to select the background color of your Google Checkout button!</p>
<p>Please note, the Google Checkout API only permits white and transparent as valid options for the button background color. Do not attempt to expand the color selection beyond what is provided in the tutorial, all attempts will fail to render a button in your stores frontend.</p>
]]></content:encoded>
			<wfw:commentRss>http://mycubecart.com/2008/11/29/google-checkout-button-background-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clean(er) CubeCart 4 URLs</title>
		<link>http://mycubecart.com/2008/11/28/cleaner-cubecart-4-urls/</link>
		<comments>http://mycubecart.com/2008/11/28/cleaner-cubecart-4-urls/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 05:33:25 +0000</pubDate>
		<dc:creator>Ron Edgecomb II</dc:creator>
				<category><![CDATA[CubeCart 3 and CubeCart 4 Tutorials]]></category>
		<category><![CDATA[CubeCart 4 Tutorials]]></category>
		<category><![CDATA[cubecart 4]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://mycubecart.com/?p=43</guid>
		<description><![CDATA[This modification may not function properly if you have selected &#8220;Use FTP generated PHP pages (If all other methods fail)&#8221; as the URL Build Option in your CubeCart settings.
If you are using CubeCart version 4 there is a fairly good chance you are making use of the search engine friendly URL features. This will replace [...]]]></description>
			<content:encoded><![CDATA[<p class="notice">This modification may not function properly if you have selected <em>&#8220;Use FTP generated PHP pages (If all other methods fail)&#8221;</em> as the <strong>URL Build Option</strong> in your CubeCart settings.</p>
<p>If you are using CubeCart version 4 there is a fairly good chance you are making use of the search engine friendly URL features. This will replace a &#8220;dirty&#8221;, query laced URL with a much cleaner search engine and user friendly URL modeled off of traditional static page URLs.</p>
<p>In making the URL clean, a .html extenstion is added to the end of the URL. For users like me, it&#8217;s not quite clean enough.</p>
<p>By leaning on WordPress in many of my web development projects, I&#8217;ve grown accustom to having my URLs end with no file extension, just a slash (eg. mycubecart.com/some/friendly/url/). This is what we aim to accomplish here.<br />
<span id="more-43"></span><br />
This modification requires the alteration of the following CubeCart 4 files:</p>
<ol>
<li>cubecart root/index.php</li>
<li>cubecart root/includes/sef_urls.inc.php</li>
</ol>
<h2>Part 1 &#8211; CubeCart Version 4.3.0 Only</h2>
<p>1. Open index.php in a text, html or php editor.</p>
<p>2. Find:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>53
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#([a-z]{1,6})_([a-z0-9+]+).?([a-z]+)?(?.*)?$#i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>3. Replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>53
54
55
56
57
58
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// BEGIN: MyCubeCart.com Mod - cleaner urls</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#([a-z]{1,6})_([a-z0-9+]+).?([a-z]+)?(/)?(?.*)?(/)?$#i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">/* Replaced
	if(preg_match('#([a-z]{1,6})_([a-z0-9+]+).?([a-z]+)?(?.*)?$#i', $_SERVER['REQUEST_URI'], $matches)) {
*/</span>
<span style="color: #666666; font-style: italic;">// END: MyCubeCart.com Mod - cleaner urls</span></pre></td></tr></table></div>

<p>4. Save file and upload.</p>
<h2>Part 1 &#8211; CubeCart Version 4.2.x</h2>
<p>1. Open index.php in a text, html or php editor.</p>
<p>2. Find:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>53
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#([a-z]{1,6})_([a-z0-9+]+).?([a-z]+)?(?.*)?$#i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>3. Replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>53
54
55
56
57
58
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// BEGIN: MyCubeCart.com Mod - cleaner urls</span>
	<span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#([a-z]{1,6})_([a-z0-9+]+).?([a-z]+)?(?.*)?(/)?$#i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">/* Replaced
	preg_match('#([a-z]{1,6})_([a-z0-9+]+).?([a-z]+)?(?.*)?$#i', $_SERVER['REQUEST_URI'], $matches);
*/</span>
<span style="color: #666666; font-style: italic;">// END: MyCubeCart.com Mod - cleaner urls</span></pre></td></tr></table></div>

<p>4. Save file and upload.</p>
<h2>Part 2 &#8211; All Version CubeCart 4.2.x &#8211; 4.3.0</h2>
<p>Line numbers below are based on that of 4.3.0. The replacements demonstated are consistent but the line numbers will vary based on the actual version of CubeCart 4 you are using.</p>
<p>1. Open sef_urls.inc.php.</p>
<p>2. Find (5 occurrences &#8211; lines: 86, 121, 147, 158 and 168):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>86
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$ext</span>	<span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sefserverconfig'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'.php'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'.html'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>3. Replace each occurrence with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>86
87
88
89
90
91
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// BEGIN: MyCubeCart.com Mod - cleaner urls</span>
	<span style="color: #000088;">$ext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">/* Replaced
	$ext	= ($config['sefserverconfig'] == 3) ? '.php' : '.html';
*/</span>
<span style="color: #666666; font-style: italic;">// END: MyCubeCart.com Mod - cleaner urls</span></pre></td></tr></table></div>

<p>4. Save file and upload.</p>
<h3>Modification Complete!</h3>
<p>Now your CubeCart URL&#8217;s will be so clean, the glare may hurt your visitors eyes!</p>
]]></content:encoded>
			<wfw:commentRss>http://mycubecart.com/2008/11/28/cleaner-cubecart-4-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
