<?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 Von Lind &#187; Website Designer, WordPress Programmer &amp; Theme Developer &#8211; Chad Von Lind</title>
	<atom:link href="http://vonlind.com/tag/shadowbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://vonlind.com</link>
	<description>Web Design Specialist, WordPress, CMS and eCommerce</description>
	<lastBuildDate>Mon, 17 Oct 2011 18:27:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Adding Shadowbox to Magento Ecommerce</title>
		<link>http://vonlind.com/2008/06/adding-shadowbox-to-magento-ecommerce/</link>
		<comments>http://vonlind.com/2008/06/adding-shadowbox-to-magento-ecommerce/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 22:24:21 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[shadowbox]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://vonlind.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-397"></span></p>
<p><span class="info">Parlez-vous français? <a href="http://google.com/translate?u=http%3A%2F%2Fvonlind.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://vonlind.com/mint/pepper/tillkruess/downloads/tracker.php?uri=http://vonlind.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_syntax">
<div class="code">
<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>
</div>
</div>
<p>with</p>
<div class="wp_syntax">
<div class="code">
<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>
</div>
</div>
<p>And around line 131 lets replace</p>
<div class="wp_syntax">
<div class="code">
<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>
</div>
</div>
<p>with</p>
<div class="wp_syntax">
<div class="code">
<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>
</div>
</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_syntax">
<div class="code">
<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>
</div>
</div>
<p> And insert this right after</p>
<div class="wp_syntax">
<div class="code">
<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>
</div>
</div>
<p>Scroll down around line 49 and look for</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">css/menu.css</pre>
</div>
</div>
<p>After that, insert this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">css/shadowbox.css</pre>
</div>
</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_syntax">
<div class="code">
<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>
		 &lt;li&gt;
		   &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">68</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">68</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;68&quot; height=&quot;68&quot; alt=&quot;&quot;/&gt;&lt;/a&gt;
		&lt;/li&gt;
	  <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>
</div>
</div>
<p>And replace it with this:</p>
<div class="wp_syntax">
<div class="code">
<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>
		 &lt;li&gt;
		   &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;shadowbox[rotation]&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">68</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">68</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;68&quot; height=&quot;68&quot; alt=&quot;&quot;/&gt;&lt;/a&gt;
		&lt;/li&gt;
	  <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>
</div>
</div>
<p><strong>version 1.1.1</strong></p>
<p>Around line 51, replace this:</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>51
52
53
</pre>
</td>
<td class="code">
<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>
        &lt;li&gt;&lt;a href=&quot;#&quot; onclick=&quot;popWin('<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryUrl</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;&quot;&gt;&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">68</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">68</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;68&quot; height=&quot;68&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">htmlEscape</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">htmlEscape</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
    <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_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>51
52
53
</pre>
</td>
<td class="code">
<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>
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;shadowbox[rotation]&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">68</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">68</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;68&quot; height=&quot;68&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">htmlEscape</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
    <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_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
	var BLANK_URL = '<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blank.html'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
	var BLANK_IMG = '<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'spacer.gif'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
&lt;/script&gt;</pre>
</div>
</div>
<p>With this</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
	var BLANK_URL = '<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blank.html'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
	var BLANK_IMG = '<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'spacer.gif'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
	var SKIN_URL = '<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsSkinUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
&lt;/script&gt;
&lt;!-- Added Shadowbox --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
window.onload = function(){ Shadowbox.init(); };
&lt;/script&gt;
&lt;!-- end Added Shadowbox --&gt;</pre>
</div>
</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>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=397&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2008/06/adding-shadowbox-to-magento-ecommerce/feed/</wfw:commentRss>
		<slash:comments>80</slash:comments>
		</item>
	</channel>
</rss>

