<?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>Chad Coleman &#187; shadowbox</title>
	<atom:link href="http://c.hadcoleman.com/tag/shadowbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://c.hadcoleman.com</link>
	<description>WordPress, Content Management Systems and eCommerce Web Specialist</description>
	<lastBuildDate>Fri, 13 Aug 2010 18:00:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding Shadowbox to Magento Ecommerce</title>
		<link>http://c.hadcoleman.com/2008/06/adding-shadowbox-to-magento-ecommerce/</link>
		<comments>http://c.hadcoleman.com/2008/06/adding-shadowbox-to-magento-ecommerce/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 22:24:21 +0000</pubDate>
		<dc:creator>Chad Coleman</dc:creator>
				<category><![CDATA[Tricks]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[shadowbox]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://c.hadcoleman.com?p=30</guid>
		<description><![CDATA[Here is a tutorial on how to add the Shadowbox modal box to your Magento powered online store. For those unfamiliar with Magento, it is the latest and greatest in open-source eCommerce software. Varian has done the online communi-tay a great service by building a shopcart the right way, from the ground up. Thanks Varian! [...]]]></description>
			<content:encoded><![CDATA[<p><span class="intro">Here is a tutorial on how to add the <a href="http://mjijackson.com/shadowbox/#demos">Shadowbox</a> modal box to your <a href="http://www.magentocommerce.com">Magento</a> powered online store.</span> For those unfamiliar with Magento, it is the latest and greatest in open-source eCommerce software. Varian has done the online communi-tay a great service by building a shopcart the right way, from the ground up. Thanks Varian! Granted, Magento has a strong learning curve, so those unfamiliar with basic HTML, CSS, or hacking at code&#8230; beware. <span id="more-30"></span></p>
<p><span class="info">Parlez-vous français? <a href="http://google.com/translate?u=http%3A%2F%2Fc.hadcoleman.com%2F2008%2F06%2Fadding-shadowbox-to-magento-ecommerce%2F&#038;hl=en&#038;ie=UTF8&#038;sl=en&#038;tl=fr">Voici une traduction Google.</a></span></p>
<p><small>Magento Wiki offers the help of <a href="http://www.magentocommerce.com/wiki/adding_lightbox_to_magento_v2">adding Lightbox2 to your Magento</a> install, for those not interested in the Shadowbox Modal.</small></p>
<h3>Step 01</h3>
<p><del datetime="2008-07-08T15:37:47+00:00"><a href="http://mjijackson.com/shadowbox/#download"><strong>Download Shadowbox</strong></a>. Go with the second download option. Just the files necessary to run shadowbox.</del></p>
<p><span class="info">Shadowbox has been recently upgraded and restructured. This tutorial used the previous Shadowbox version structure. I&#8217;ve compiled Shadowbox how it used to be and created the proper directory structure as well. Please use this download link for your Shadowbox files.</span></p>
<p><span class="download"><a href="http://c.hadcoleman.com/mint/pepper/tillkruess/downloads/tracker.php?uri=http://c.hadcoleman.com/files/shadowbox-for-magento.zip">Shadowbox for Magento.</a></span></p>
<p>As you are using this tutorial to add Shadowbox to a site that obviously is for commercial purposes, you&#8217;ll need to <strong>buy the Shadowbox Commercial License for $20</strong>.</p>
<p>Assuming that magento is installed in your root directory (yourdomain.com) -</p>
<p>From the root open the /js directory</p>
<p><code>yourdomain.com/js</code></p>
<p>Inside of the /js directory create a new directory named &#8220;sb&#8221; which is short for shadowbox</p>
<p><code>yourdomain.com/js/sb</code></p>
<p>Inside of /sb lets upload the 3 shadowbox directories /build, /images, and /src. So now on the server we should have:</p>
<p><code>yourdomain.com/js/sb/build<br />
yourdomain.com/js/sb/images<br />
yourdomain.com/js/sb/src</code></p>
<h3>Step 02</h3>
<p>Lets open your template directory and drop in the CSS file that comes with Shadowbox.</p>
<p><span class="info">This tutorial will make use of the default template. So if you are not using the default template, you&#8217;ll need to exchange the default template name for your own template directory name.</span></p>
<p>The default template can be found here:</p>
<p><code>yourdomain.com/skin/frontend/default/default/</code></p>
<p>So now, you should have the CSS file named <em>shadowbox.css</em> in this directory:</p>
<p><code>yourdomain.com/skin/frontend/default/default/css/shadowbox.css</code></p>
<p><span class="info">The Shadowbox CSS file can be found in /build/css/ of the shadowbox zip file that you downloaded.</span></p>
<h3>Step 03</h3>
<p>Lets open your template directory and drop in the images used by Shadowbox. Open your default template, open the images directory, and create a new directory named &#8220;sb&#8221;. Drop in the images that are found in the images directory of the Shadowbox download. So now you should have</p>
<p><code>yourdomain.com/skin/frontend/default/default/images/sb/loading.gif<br />
yourdomain.com/skin/frontend/default/default/images/sb/loading-light.gif<br />
yourdomain.com/skin/frontend/default/default/images/sb/overlay-85.png</code></p>
<h3>Step 04</h3>
<p>Now we need to modify the Shadowbox Javascript. Open up the javascript found at:</p>
<p><code>yourdomain.com/js/sb/src/js/shadowbox.js</code></p>
<p>Around line 81, lets replace</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code15'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3015"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p30code15"><pre class="javascript" style="font-family:monospace;">loadingImage<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'images/loading.gif'</span><span style="color: #339933;">,</span></pre></td></tr></table></div>

<p>with</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code16'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3016"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p30code16"><pre class="javascript" style="font-family:monospace;">loadingImage<span style="color: #339933;">:</span>  SKIN_URL <span style="color: #339933;">+</span> <span style="color: #3366CC;">'images/sb/loading.gif'</span><span style="color: #339933;">,</span></pre></td></tr></table></div>

<p>And around line 131 lets replace</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code17'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3017"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p30code17"><pre class="javascript" style="font-family:monospace;">overlayBgImage<span style="color: #339933;">:</span>    <span style="color: #3366CC;">'images/sb/overlay-85.png'</span><span style="color: #339933;">,</span></pre></td></tr></table></div>

<p>with</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code18'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3018"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p30code18"><pre class="javascript" style="font-family:monospace;">overlayBgImage<span style="color: #339933;">:</span>    SKIN_URL <span style="color: #339933;">+</span> <span style="color: #3366CC;">'images/sb/overlay-85.png'</span><span style="color: #339933;">,</span></pre></td></tr></table></div>

<h3>Step 05</h3>
<p>Now lets modify the Magento template files and set them to use Shadowbox. Open up <code>yourdomain.com/app/design/frontend/default/default/layout/page.xml</code></p>
<p>Around line 42, look for</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code19'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3019"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p30code19"><pre class="html" style="font-family:monospace;">&lt;action method=&quot;addJs&quot;&gt;&lt;script&gt;mage/cookies.js&lt;/script&gt;&lt;/action&gt;</pre></td></tr></table></div>

<p> And insert this right after</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code20'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3020"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p30code20"><pre class="html" style="font-family:monospace;">&lt;action method=&quot;addJs&quot;&gt;&lt;script&gt;sb/src/js/lib/yui-utilities.js&lt;/script&gt;&lt;/action&gt;
&lt;action method=&quot;addJs&quot;&gt;&lt;script&gt;sb/src/js/adapter/shadowbox-prototype.js&lt;/script&gt;&lt;/action&gt;
&lt;action method=&quot;addJs&quot;&gt;&lt;script&gt;sb/src/js/shadowbox.js&lt;/script&gt;&lt;/action&gt;</pre></td></tr></table></div>

<p>Scroll down around line 49 and look for</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code21'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3021"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p30code21"><pre class="html" style="font-family:monospace;">css/menu.css</pre></td></tr></table></div>

<p>After that, insert this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code22'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3022"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p30code22"><pre class="html" style="font-family:monospace;">css/shadowbox.css</pre></td></tr></table></div>

<p>Save and close.</p>
<p>Now lets open up <code>yourdomain.com/app/design/frontend/default/default/template/catalog/product/view/media.phtml </code></p>
<p><strong>In version 1.0</strong> (1.1.1 below)<br />
Around line 51 find this code:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code23'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3023"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p30code23"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryImages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		 <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
		   <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php&amp;phpMyAdmin=410c4af8e9e6t1397404 echo <span style="color: #006699; font-weight: bold;">$this-&gt;helper</span>('catalog/image')-&gt;init(<span style="color: #006699; font-weight: bold;">$this-&gt;getProduct</span>(), 'image', <span style="color: #006699; font-weight: bold;">$_image-&gt;getFile</span>()); ?&gt;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$_product-&gt;getName</span>();?&gt;&quot;</span><span style="color: #339933;">&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$this-&gt;helper</span>('catalog/image')-&gt;init(<span style="color: #006699; font-weight: bold;">$this-&gt;getProduct</span>(), 'thumbnail', <span style="color: #006699; font-weight: bold;">$_image-&gt;getFile</span>())-&gt;resize(68, 68); ?&gt;&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;68&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;68&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
	  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>And replace it with this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code24'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3024"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p30code24"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryImages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		 <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
		   <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php&amp;phpMyAdmin=410c4af8e9e6t1397404 echo <span style="color: #006699; font-weight: bold;">$this-&gt;helper</span>('catalog/image')-&gt;init(<span style="color: #006699; font-weight: bold;">$this-&gt;getProduct</span>(), 'image', <span style="color: #006699; font-weight: bold;">$_image-&gt;getFile</span>()); ?&gt;&quot;</span> rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;shadowbox[rotation]&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$_product-&gt;getName</span>();?&gt;&quot;</span><span style="color: #339933;">&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$this-&gt;helper</span>('catalog/image')-&gt;init(<span style="color: #006699; font-weight: bold;">$this-&gt;getProduct</span>(), 'thumbnail', <span style="color: #006699; font-weight: bold;">$_image-&gt;getFile</span>())-&gt;resize(68, 68); ?&gt;&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;68&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;68&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
	  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><strong>version 1.1.1</strong></p>
<p>Around line 51, replace this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code25'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3025"><td class="line_numbers"><pre>51
52
53
</pre></td><td class="code" id="p30code25"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryImages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;#&quot;</span> onclick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;popWin('&lt;?php echo <span style="color: #006699; font-weight: bold;">$this-&gt;getGalleryUrl</span>(<span style="color: #006699; font-weight: bold;">$_image</span>) ?&gt;', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;&quot;</span><span style="color: #339933;">&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$this-&gt;helper</span>('catalog/image')-&gt;init(<span style="color: #006699; font-weight: bold;">$this-&gt;getProduct</span>(), 'thumbnail', <span style="color: #006699; font-weight: bold;">$_image-&gt;getFile</span>())-&gt;resize(68, 68); ?&gt;&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;68&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;68&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$this-&gt;htmlEscape</span>(<span style="color: #006699; font-weight: bold;">$_image-&gt;getLabel</span>()) ?&gt;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$this-&gt;htmlEscape</span>(<span style="color: #006699; font-weight: bold;">$_image-&gt;getLabel</span>()) ?&gt;&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>with this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code26'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3026"><td class="line_numbers"><pre>51
52
53
</pre></td><td class="code" id="p30code26"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryImages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php&amp;phpMyAdmin=410c4af8e9e6t1397404 echo <span style="color: #006699; font-weight: bold;">$this-&gt;helper</span>('catalog/image')-&gt;init(<span style="color: #006699; font-weight: bold;">$this-&gt;getProduct</span>(), 'image', <span style="color: #006699; font-weight: bold;">$_image-&gt;getFile</span>()); ?&gt;&quot;</span> rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;shadowbox[rotation]&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$_product-&gt;getName</span>();?&gt;&quot;</span><span style="color: #339933;">&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$this-&gt;helper</span>('catalog/image')-&gt;init(<span style="color: #006699; font-weight: bold;">$this-&gt;getProduct</span>(), 'thumbnail', <span style="color: #006699; font-weight: bold;">$_image-&gt;getFile</span>())-&gt;resize(68, 68); ?&gt;&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;68&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;68&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$this-&gt;htmlEscape</span>(<span style="color: #006699; font-weight: bold;">$_image-&gt;getLabel</span>()) ?&gt;&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>This just adds the rel=&#8221;shadowbox[rotation]&#8221; call to the anchor tag, to let shadowbox know that we are summoning its powers. Save and close.</p>
<p>Now lets open the file <code>yourdomain.com/app/design/frontend/default/default/template/page/html/head.phtml </code></p>
<p>Lets replace</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code27'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3027"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p30code27"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">var</span> BLANK_URL <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;?php echo $this-&gt;helper('</span>core<span style="color: #339933;">/</span>js<span style="color: #0000ff;">')-&gt;getJsUrl('</span>blank<span style="color: #339933;">.</span>html<span style="color: #0000ff;">') ?&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> BLANK_IMG <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;?php echo $this-&gt;helper('</span>core<span style="color: #339933;">/</span>js<span style="color: #0000ff;">')-&gt;getJsUrl('</span>spacer<span style="color: #339933;">.</span>gif<span style="color: #0000ff;">') ?&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></pre></td></tr></table></div>

<p>With this</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p30code28'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3028"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p30code28"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">var</span> BLANK_URL <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;?php echo $this-&gt;helper('</span>core<span style="color: #339933;">/</span>js<span style="color: #0000ff;">')-&gt;getJsUrl('</span>blank<span style="color: #339933;">.</span>html<span style="color: #0000ff;">') ?&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> BLANK_IMG <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;?php echo $this-&gt;helper('</span>core<span style="color: #339933;">/</span>js<span style="color: #0000ff;">')-&gt;getJsUrl('</span>spacer<span style="color: #339933;">.</span>gif<span style="color: #0000ff;">') ?&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> SKIN_URL <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;?php echo $this-&gt;helper('</span>core<span style="color: #339933;">/</span>js<span style="color: #0000ff;">')-&gt;getJsSkinUrl('</span><span style="color: #0000ff;">') ?&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
<span style="color: #339933;">&lt;!--</span> Added Shadowbox <span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
window<span style="color: #339933;">.</span>onload <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> Shadowbox<span style="color: #339933;">.</span>init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
<span style="color: #339933;">&lt;!--</span> <span style="color: #990000;">end</span> Added Shadowbox <span style="color: #339933;">--&gt;</span></pre></td></tr></table></div>

<p>Save and close.</p>
<h3>Enjoy The Fruits</h3>
<p>And now shadowbox should be fully functional for your product images. If you run into any problems, feel free to post questions or comments here.</p>
<p>And don&#8217;t forget to tip the man for his Shadowbox work!</p>
<p>
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input name="cmd" value="_s-xclick" type="hidden">
<input name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----" type="hidden">
<input id="tip-button" class="button" value="Give a Tip" name="submit" alt="Make a donation with PayPal - it's fast, free and secure!" type="submit">    </form></p>
<img src="http://c.hadcoleman.com/?ak_action=api_record_view&id=30&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://c.hadcoleman.com/2008/06/adding-shadowbox-to-magento-ecommerce/feed/</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
	</channel>
</rss>
