<?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>Webmaster Bulletin &#187; E commerce</title>
	<atom:link href="http://www.webmasterbulletin.net/category/applications/e-commerce/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webmasterbulletin.net</link>
	<description>Rambling around the web publishing industry</description>
	<lastBuildDate>Wed, 21 Jul 2010 09:48:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Magento : how to learn from free templates</title>
		<link>http://www.webmasterbulletin.net/2009/10/magento-how-to-learn-from-free-templates/1030</link>
		<comments>http://www.webmasterbulletin.net/2009/10/magento-how-to-learn-from-free-templates/1030#comments</comments>
		<pubDate>Thu, 29 Oct 2009 11:08:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E commerce]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=1030</guid>
		<description><![CDATA[The power of Magento is great but it requires long days of learning and suffering to get through relative simple features, such as the now common front page slide banner. I had a quick look at magento free templates on google and was conquered by Magento &#8217;s classic theme, the kind of  stuff that&#8217;s really [...]]]></description>
			<content:encoded><![CDATA[<p>The power of Magento is great but it requires long days of learning and suffering to get through relative simple features, such as the now common front page slide banner. I had a quick look at magento free templates on google and was conquered by Magento &#8217;s classic theme, the kind of  stuff that&#8217;s really given free of charge when I would have paid for it. It actually comes with an interesting development of Magento&#8217;s block systems, and demonstrates how to add a custom block between navigation and content : the prototype glider that scrolls images is defined a cms static block, which is then called in the home page CMS  custom xml definition, with a reference to the slider block that&#8217;s positionned in phtml files and declared in the xml layouts as a core/text_list type . Impressive stuff : that&#8217;s pure  magento design and illustrates how versatile the system is.</p>
<p>Links : <a href="http://www.smashingmagazine.com/2009/05/05/25-magento-templates-for-your-e-commerce-business/" target="_blank">25 free templates for Magento</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/10/magento-how-to-learn-from-free-templates/1030/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento log cleaner</title>
		<link>http://www.webmasterbulletin.net/2009/10/magento-log-cleaner/1013</link>
		<comments>http://www.webmasterbulletin.net/2009/10/magento-log-cleaner/1013#comments</comments>
		<pubDate>Mon, 12 Oct 2009 09:41:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E commerce]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=1013</guid>
		<description><![CDATA[Magento, in earlier versions, does not seem to handle log cleaning very well. A lot of configuration options are vailable under the configuration  / Advanced / System menu, that seem to have an impact on the cron.php process. But trying to remove logs this way is a complicated task that involves full log counting (select [...]]]></description>
			<content:encoded><![CDATA[<p>Magento, in earlier versions, does not seem to handle log cleaning very well. A lot of configuration options are vailable under the configuration  / Advanced / System menu, that seem to have an impact on the cron.php process. But trying to remove logs this way is a complicated task that involves full log counting (select count on mage_log_visitor) and the result is not always there, don&#8217;t know why. A full truncate on log tables seems more appropriate, as described on the knowledge base, to use with caution obviously : <a href="http://www.magentocommerce.com/wiki/groups/227/maintenance_script" target="_blank">Magento Maintenance Script</a> was posted a few days ago but I tried it and it&#8217;s pretty efficient. Let us know how it performed on your install, on mine it works well. Go ahead after you&#8217;ve performed the appropriate backups !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/10/magento-log-cleaner/1013/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magento email configuration pain and how to solve it</title>
		<link>http://www.webmasterbulletin.net/2009/09/magento-email-configuration-pain-and-how-to-solve-it/1011</link>
		<comments>http://www.webmasterbulletin.net/2009/09/magento-email-configuration-pain-and-how-to-solve-it/1011#comments</comments>
		<pubDate>Mon, 28 Sep 2009 14:41:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E commerce]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=1011</guid>
		<description><![CDATA[It&#8217;s nice to setup a magento shop, but one particular task is painful and time consuming : the modification  of automatic email templates . By defautl, email tempaltes in Magento are well designed as a sample given out to the developer, but when you expect to have your shop running in a few hours  time, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s nice to setup a magento shop, but one particular task is painful and time consuming : the modification  of automatic email templates . By defautl, email tempaltes in Magento are well designed as a sample given out to the developer, but when you expect to have your shop running in a few hours  time, it is really a pain to go through all emails jsut to change phone numbers, shop name, and opening times especially when this information could be centralized in the database.  The subject is not new and here a few hacks to let you work faster when setting up a shop</p>
<ul>
<li>You can use a linux script to automatically modify magento email template files in your language / email folder
<ul>
<li>script 1<br />
<a href="http://www.osetemplates.com/?p=138">http://www.osetemplates.com/?p=138</a></li>
<li>script 2 (slightly better because incorporates store specific vairables in the script)<br />
<a href="http://www.pridedesign.ie/content/magento-email-template-script">http://www.pridedesign.ie/content/magento-email-template-script</a></li>
</ul>
</li>
<li>You can also use the<a href="http://www.magentocommerce.com/extension/1692/email-template-adapter" target="_blank"> email template adapter extension</a> to get the job done via magento&#8217;s administration interface</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/09/magento-email-configuration-pain-and-how-to-solve-it/1011/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Page javascript shopping cart</title>
		<link>http://www.webmasterbulletin.net/2009/08/one-page-javascript-shopping-cart/961</link>
		<comments>http://www.webmasterbulletin.net/2009/08/one-page-javascript-shopping-cart/961#comments</comments>
		<pubDate>Wed, 19 Aug 2009 16:57:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E commerce]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=961</guid>
		<description><![CDATA[This one struck me because I can remember working out a javascript shopping cart back in 1996&#8230; Long time ago in terms of web time, and 13 years later the idea has popped again from some strange mind figuring out that simplicity does it all. If you&#8217;ve had enough of configuring complex ecommerce solutions like [...]]]></description>
			<content:encoded><![CDATA[<p>This one struck me because I can remember working out a javascript shopping cart back in 1996&#8230; Long time ago in terms of web time, and 13 years later the idea has popped again from some strange mind figuring out that simplicity does it all. If you&#8217;ve had enough of configuring complex ecommerce solutions like <a href="http://www.webmasterbulletin.net/tag/magento">Magento </a>or Prestashop, then simplecart(js) is for you. &#8220;<em>No databases, no programming, no headaches. A simple</em><strong><em>javascript shopping cart</em></strong><em> in under 20kb that you can setup in minutes. It&#8217;s lightweight, fast, simple to use, and completely customizable. </em><strong><em>All you need to know is basic HTML.</em></strong><strong>&#8220;</strong> Works with Paypal and google checkout apparently.</p>
<p><a href="http://www.webmasterbulletin.net/wp-content/uploads/2009/08/simplecart.jpg" rel="lightbox[961]"><img class="aligncenter size-full wp-image-962" title="simplecart" src="http://www.webmasterbulletin.net/wp-content/uploads/2009/08/simplecart.jpg" alt="simplecart" width="480" height="247" /></a></p>
<p><a href="http://simplecartjs.com/">http://simplecartjs.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/08/one-page-javascript-shopping-cart/961/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento release 1.4</title>
		<link>http://www.webmasterbulletin.net/2009/08/magento-release-14/950</link>
		<comments>http://www.webmasterbulletin.net/2009/08/magento-release-14/950#comments</comments>
		<pubDate>Thu, 13 Aug 2009 12:10:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[E commerce]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=950</guid>
		<description><![CDATA[It&#8217;s only alpha but I&#8217;ve tested it because I&#8217;m still running 1.2 and I&#8217;m waiting for serious reason to upgrade : I can tell you I&#8217;ve seriously avoided the basic Magento advice whic is &#8216;never hack the core&#8217;, and I have a dozen fixes implemented in the app/code/core section of my production install, which means [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s only alpha but I&#8217;ve tested it because I&#8217;m still running 1.2 and I&#8217;m waiting for serious reason to upgrade : I can tell you I&#8217;ve seriously avoided the basic Magento advice whic is &#8216;never hack the core&#8217;, and I have a dozen fixes implemented in the app/code/core section of my production install, which means a few hours upgrade. Reading <a href="http://www.magentocommerce.com/download/release_notes#Release%20Notes%20-%20Magento%201.4.0.0-alpha1%20%28August%2011,%202009%29">Release notes </a>was not very interesting so I decided I&#8217;d for a test drive. Well not much to say except the new tax system which is suited to european complexity, including or excluding shipping costs, reductions and other attributes are available in the system/ admin menu. The most noticeabl imporvement was not indeed produced by Magento but by google : remember at some time <a href="http://www.magentocommerce.com/boards/viewthread/18342/">Chrome did not work well with the admin</a>. This is now fixed, and thanks to a better cookie management chrome now handles magento admin pefectly, which means faster work. For enterprise users (9000 $ /year), a new video has been posted about private sales that offer special deals to users for a limited time using special member restricted access with invitations. Magento actually works well with emails, including reports on accepted invitations and generated sales. <a href="http://www.magentocommerce.com/blog/comments/enterprise-edition-private-sales/">Enjoy</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/08/magento-release-14/950/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tomatocart rebuilds oscommerce</title>
		<link>http://www.webmasterbulletin.net/2009/06/tomatocart-rebuilds-oscommerce/893</link>
		<comments>http://www.webmasterbulletin.net/2009/06/tomatocart-rebuilds-oscommerce/893#comments</comments>
		<pubDate>Tue, 23 Jun 2009 06:59:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E commerce]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=893</guid>
		<description><![CDATA[
There are many discussions on whether oscommerce is dead or not. From an industry where every six months new products come online with ever more exciting new features, the longevity of Oscommerce, the first opensource e commerce application, is a good example of a bad designed  application theat does the job well. Os commerce evolution [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webmasterbulletin.net/wp-content/uploads/2009/06/tomatocart.jpg" rel="lightbox[893]"><img class="aligncenter size-full wp-image-894" title="tomatocart" src="http://www.webmasterbulletin.net/wp-content/uploads/2009/06/tomatocart.jpg" alt="tomatocart" width="490" height="308" /></a></p>
<p>There are many discussions on whether oscommerce is dead or not. From an industry where every six months new products come online with ever more exciting new features, the longevity of Oscommerce, the first opensource e commerce application, is a good example of a bad designed  application theat does the job well. Os commerce evolution has stopped in 2005, when the first preview of the MS3 version &#8211; not yet released as of today &#8211; went public. What struck me with tomatocart is the backend interface, based on ext js desktop layout with charts by piwik / openchart flash . More info on <a href="http://www.tomatocart.com/">http://www.tomatocart.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/06/tomatocart-rebuilds-oscommerce/893/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magento showcase : Rue de Siam</title>
		<link>http://www.webmasterbulletin.net/2009/04/magento-showcase-rue-de-siam/773</link>
		<comments>http://www.webmasterbulletin.net/2009/04/magento-showcase-rue-de-siam/773#comments</comments>
		<pubDate>Mon, 20 Apr 2009 21:15:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design showcase]]></category>
		<category><![CDATA[E commerce]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=773</guid>
		<description><![CDATA[
I&#8217;ve finally released my first Magento website, and it proves to be a  real SEO winner (100% increase in visits after 2 weeks). RuedeSiam is a furniture importer based in Brittany. Now you know why I bothered comparing commercial and opensource Flash based zoomers : Rue de Siam&#8217;s website site features an implementation of image  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webmasterbulletin.net/wp-content/uploads/2009/04/screenshot1.jpg" rel="lightbox[773]"><img class="aligncenter size-full wp-image-778" title="screenshot1" src="http://www.webmasterbulletin.net/wp-content/uploads/2009/04/screenshot1.jpg" alt="screenshot1" width="500" height="359" /></a></p>
<p>I&#8217;ve finally released my first Magento website, and it proves to be a  real SEO winner (100% increase in visits after 2 weeks). RuedeSiam is a <a href="http://www.ruedesiam.com">furniture importer based in Brittany</a>. Now you know why I bothered<a href="http://www.webmasterbulletin.net/2009/02/zoom-and-pan-with-flash/663"> comparing commercial and opensource Flash based zoomers</a> : Rue de Siam&#8217;s website site features an implementation of image  a flash based zoom within a prototype lightbox gallery   (<a title="chaise design chair" href="http://www.ruedesiam.com/collection/patrick-robert/meuble-patrick-robert/p-robert-chaise-medaillon.html">check out this one</a>) . Interesting too is the specific template for the &#8220;<a href="http://www.ruedesiam.com/chez-vous.html/">At your home</a>&#8221; showcase category that uses products with  specific layout. Magento is really great for customising layouts, I suppose that&#8217;s partly a big feature of Zend Framework expressed at its best. One technique I used a lot is the <a href="http://www.webmasterbulletin.net/2008/07/laying-text-over-title-image-in-wordpress/148">css based text over image transparency effect </a>that I detailed a while ago for Wordpress on this blog. Works fine with Magento images categories except that the background image really has to be adjusted perfectly so I used <a href="http://phpthumb.sourceforge.net/">phpthumbs</a> instead of Magento&#8217;s resizing helpers that seemed to complicated to understand at first.   I&#8217;ve also covered  various development challenges that I shared on this blog during the development :</p>
<ul>
<li> <a title="Magento products specials" href="http://www.webmasterbulletin.net/2009/04/product-specials-on-home-page/757">products special display on home page</a>,</li>
<li><a href="http://www.webmasterbulletin.net/2009/03/magento-product-display-new-product-icon-on-product-list/740">display new product icon on product list</a></li>
<li><a href="http://www.webmasterbulletin.net/2009/02/magento-product-page-how-to-display-other-products-from-same-category/647">how to display products from other categories on the product view page</a></li>
</ul>
<p><strong>And a few tips :</strong></p>
<ul>
<li><a href="http://www.webmasterbulletin.net/2009/03/magento-custom-attributes-display-on-product-page/693">Display custom attributes on product page</a></li>
<li><a href="http://www.webmasterbulletin.net/2009/02/magento-cms-2-methods-for-static-blocks/657">Magento static blocks display</a></li>
</ul>
<p><strong>One advice : </strong>once you&#8217;re running a Magento production web site, be careful with upgrades. The Sales extension did not work with 1.3.0 on my development server and I&#8217;m sticking to 1.2.x for the moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/04/magento-showcase-rue-de-siam/773/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Product specials on home page</title>
		<link>http://www.webmasterbulletin.net/2009/04/product-specials-on-home-page/757</link>
		<comments>http://www.webmasterbulletin.net/2009/04/product-specials-on-home-page/757#comments</comments>
		<pubDate>Wed, 01 Apr 2009 22:04:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E commerce]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=757</guid>
		<description><![CDATA[This tutorial explains briefly how to display one product on sale on the right column of thehome page, but that could be any page in fact.The code below is inspired from the front page featured product tutorial.

Step 1 : create the product special block  class/ Note that the getSpecialProducts function is inspired from the sales [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial explains briefly how to display one product on sale on the right column of thehome page, but that could be any page in fact.The code below is inspired from the <a href="http://inchoo.net/ecommerce/magento/featured-products-on-magento-frontpage/">front page featured product tutorial</a>.<span id="more-757"></span></p>
<ul>
<li><strong>Step 1</strong> : create the product special block  class/ Note that the getSpecialProducts function is inspired from the <a href="http://www.magentocommerce.com/extension/841/catalog-sale-items">sales catalog list</a> extension<br />
create the file app\code\local\PoleOuest\Catalog\Block\Product\Special.php</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">class</span> PoleOuest_Catalog_Block_Product_Special <span class="kw2">extends</span> Mage_Catalog_Block_Product_Abstract</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">protected <span class="kw2">function</span> _getStoreId<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$storeId</span> = <span class="kw2">null</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$storeId</span> == <span class="kw2">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$storeId</span> = Mage::<span class="me2">app</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getStore</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getId</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">return</span> <span class="re0">$storeId</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">protected <span class="kw2">function</span> _getCustomerGroupId<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$custGroupID</span> = <span class="kw2">null</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$custGroupID</span> == <span class="kw2">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$custGroupID</span> = Mage::<span class="me2">getSingleton</span><span class="br0">&#40;</span><span class="st0">&#8216;customer/session&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getCustomerGroupId</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="re0">$custGroupID</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// POLEOUEST Method from salescatalog</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">function</span> getSpecialProducts<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/is_null"><span class="kw3">is_null</span></a><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;_productCollection<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$storeId</span> = <span class="re0">$this</span>-&gt;_getStoreId<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$websiteId</span> = Mage::<span class="me2">app</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getStore</span><span class="br0">&#40;</span><span class="re0">$storeId</span><span class="br0">&#41;</span>-&gt;<span class="me1">getWebsiteId</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$custGroup</span> = <span class="re0">$this</span>-&gt;_getCustomerGroupId<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$product</span> = Mage::<span class="me2">getModel</span><span class="br0">&#40;</span><span class="st0">&#8216;catalog/product&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$todayDate</span> = <span class="re0">$product</span>-&gt;<span class="me1">getResource</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">formatDate</span><span class="br0">&#40;</span><a href="http://www.php.net/time"><span class="kw3">time</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>, <span class="kw2">false</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$rulePriceWhere</span> = <span class="st0">&quot;({{table}}.rule_date is null) or ({{table}}.rule_date=&#8217;$todayDate&#8217; and {{table}}.website_id=&#8217;$websiteId&#8217; and {{table}}.customer_group_id=&#8217;$custGroup&#8217;)&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$productAttributes</span> = <a href="http://www.php.net/array_flip"><span class="kw3">array_flip</span></a><span class="br0">&#40;</span>Mage::<span class="me2">getSingleton</span><span class="br0">&#40;</span><span class="st0">&#8216;catalog/config&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getProductAttributes</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/unset"><span class="kw3">unset</span></a><span class="br0">&#40;</span><span class="re0">$productAttributes</span><span class="br0">&#91;</span><span class="st0">&#8216;price_type&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/unset"><span class="kw3">unset</span></a><span class="br0">&#40;</span><span class="re0">$productAttributes</span><span class="br0">&#91;</span><span class="st0">&#8216;price_view&#8217;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$productAttributes</span> = <a href="http://www.php.net/array_flip"><span class="kw3">array_flip</span></a><span class="br0">&#40;</span><span class="re0">$productAttributes</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$specials</span> = <span class="re0">$product</span>-&gt;<span class="me1">setStoreId</span><span class="br0">&#40;</span><span class="re0">$storeId</span><span class="br0">&#41;</span>-&gt;<span class="me1">getResourceCollection</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">addAttributeToFilter</span><span class="br0">&#40;</span><span class="st0">&#8217;special_price&#8217;</span>, <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;gt&#8217;</span>=&gt;<span class="nu0">0</span><span class="br0">&#41;</span>, <span class="st0">&#8216;left&#8217;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">addAttributeToFilter</span><span class="br0">&#40;</span><span class="st0">&#8217;special_from_date&#8217;</span>, <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;date&#8217;</span>=&gt;true, <span class="st0">&#8216;to&#8217;</span>=&gt; <span class="re0">$todayDate</span><span class="br0">&#41;</span>, <span class="st0">&#8216;left&#8217;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">addAttributeToFilter</span><span class="br0">&#40;</span><a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;attribute&#8217;</span>=&gt;<span class="st0">&#8217;special_to_date&#8217;</span>, <span class="st0">&#8216;date&#8217;</span>=&gt;true, <span class="st0">&#8216;from&#8217;</span>=&gt;<span class="re0">$todayDate</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li2">
<div class="de2"><a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;attribute&#8217;</span>=&gt;<span class="st0">&#8217;special_to_date&#8217;</span>, <span class="st0">&#8216;is&#8217;</span> =&gt; <span class="kw2">new</span> Zend_Db_Expr<span class="br0">&#40;</span><span class="st0">&#8216;null&#8217;</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#41;</span>, <span class="st0">&#8221;</span>, <span class="st0">&#8216;left&#8217;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">addAttributeToSort</span><span class="br0">&#40;</span><span class="st0">&#8217;special_from_date&#8217;</span>, <span class="st0">&#8216;desc&#8217;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">addAttributeToSelect</span><span class="br0">&#40;</span><span class="re0">$productAttributes</span>, <span class="st0">&#8216;inner&#8217;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">joinTable</span><span class="br0">&#40;</span><span class="st0">&#8216;catalogrule/rule_product_price&#8217;</span>, <span class="st0">&#8216;product_id=entity_id&#8217;</span>, <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;rule_price&#8217;</span>=&gt;<span class="st0">&#8216;rule_price&#8217;</span>, <span class="st0">&#8216;rule_start_date&#8217;</span>=&gt;<span class="st0">&#8216;latest_start_date&#8217;</span>, <span class="st0">&#8216;rule_date&#8217;</span>=&gt;<span class="st0">&#8216;rule_date&#8217;</span><span class="br0">&#41;</span>, <span class="re0">$rulePriceWhere</span>, <span class="st0">&#8216;left&#8217;</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2">;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$specials</span>-&gt;<span class="me1">getSelect</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">order</span><span class="br0">&#40;</span><span class="kw2">new</span> Zend_Db_Expr<span class="br0">&#40;</span><span class="st0">&#8216;RAND()&#8217;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>-&gt;<span class="me1">limit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>; ;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$rulePriceCollection</span> = Mage::<span class="me2">getResourceModel</span><span class="br0">&#40;</span><span class="st0">&#8216;catalogrule/rule_product_price_collection&#8217;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">addFieldToFilter</span><span class="br0">&#40;</span><span class="st0">&#8216;website_id&#8217;</span>, <span class="re0">$websiteId</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2">-&gt;<span class="me1">addFieldToFilter</span><span class="br0">&#40;</span><span class="st0">&#8216;customer_group_id&#8217;</span>, <span class="re0">$custGroup</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">addFieldToFilter</span><span class="br0">&#40;</span><span class="st0">&#8216;rule_date&#8217;</span>, <span class="re0">$todayDate</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$productIds</span> = <span class="re0">$rulePriceCollection</span>-&gt;<span class="me1">getProductIds</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">if</span> <span class="br0">&#40;</span>!<a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$productIds</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$specials</span>-&gt;<span class="me1">getSelect</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">orWhere</span><span class="br0">&#40;</span><span class="st0">&#8216;e.entity_id in (&#8217;</span>.<a href="http://www.php.net/implode"><span class="kw3">implode</span></a><span class="br0">&#40;</span><span class="st0">&#8216;,&#8217;</span>,<span class="re0">$productIds</span><span class="br0">&#41;</span>.<span class="st0">&#8216;)&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">Mage::<span class="me2">getSingleton</span><span class="br0">&#40;</span><span class="st0">&#8216;catalog/product_status&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">addVisibleFilterToCollection</span><span class="br0">&#40;</span><span class="re0">$specials</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">Mage::<span class="me2">getSingleton</span><span class="br0">&#40;</span><span class="st0">&#8216;catalog/product_visibility&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">addVisibleInCatalogFilterToCollection</span><span class="br0">&#40;</span><span class="re0">$specials</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$this</span>-&gt;_productCollection = <span class="re0">$specials</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="re0">$this</span>-&gt;_productCollection;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">?&gt;</span></div>
</li>
</ol>
</div>
</li>
<li><strong>Step 2 :</strong> add new block to your etc/config.xml in global/blocks/catalog<br />
&lt;rewrite&gt;<br />
&lt;product_special&gt;PoleOuest_Catalog_Block_Product_Special&lt;/product_special&gt;<br />
&lt;/rewrite&gt;</li>
<li><strong>Step 3 :</strong> create your template catalog/product/PoleOuestSpecial.phtml with the loop inspired from the catalog/product/list.phtml</li>
<li><strong>Step 4 :</strong> declare your block in your layout/catalog.xml in the right.permanent.callout block<br />
&lt;block type=&#8221;catalog/product_special&#8221; name=&#8221;product_special&#8221; as=&#8221;product_special&#8221; template=&#8221;catalog/product/PoleOuestSpecial.phtml&#8221; /&gt;</li>
<li><strong>Step 5 :</strong> call your child HTML where you want it in \template\callouts\right_col.phtml :<br />
&lt;?php echo $this-&gt;getChildHtml(&#8217;product_special&#8217;) ?&gt;</li>
</ul>
<p>and let us know how it went for you</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/04/product-specials-on-home-page/757/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magento product : display new product  icon on product list</title>
		<link>http://www.webmasterbulletin.net/2009/03/magento-product-display-new-product-icon-on-product-list/740</link>
		<comments>http://www.webmasterbulletin.net/2009/03/magento-product-display-new-product-icon-on-product-list/740#comments</comments>
		<pubDate>Wed, 25 Mar 2009 18:17:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E commerce]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=740</guid>
		<description><![CDATA[If you&#8217;re working on Magento Ecommerce layouts and template design, you might have had a look at some nasty bugs, such the sort by price bug that&#8217;s occuring on Magento&#8217;s latest release (1.2..1). If you&#8217;ve spent a few minutes reading the fix for that bug on Magento&#8217;s forums, you know what product collection means. Product [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re working on Magento Ecommerce layouts and template design, you might have had a look at some nasty bugs, such the sort by price bug that&#8217;s occuring on Magento&#8217;s latest release (1.2..1). If you&#8217;ve spent a few minutes reading the <a href="http://www.magentocommerce.com/boards/viewthread/28155/">fix for that bug on Magento&#8217;s forums</a>, you know what product collection means. Product Collection in Magento means an easy way of listing products for specific blocks : the big drawback is that product collections store arrays of products, and products inside don&#8217;t always come fully loaded of details. That&#8217;s why the few hacks below are useful to get the very basic attribute of every product on a decent ecommerce store : is that product new or not, and should I tell my customer which products are new ???</p>
<p><a href="http://www.webmasterbulletin.net/wp-content/uploads/2009/03/magento-new-product.png" rel="lightbox[740]"></a><a href="http://www.webmasterbulletin.net/wp-content/uploads/2009/03/magento-new-product490.png" rel="lightbox[740]"><img class="aligncenter size-full wp-image-744" title="magento-new-product490" src="http://www.webmasterbulletin.net/wp-content/uploads/2009/03/magento-new-product490.png" alt="magento-new-product490" width="490" height="363" /></a></p>
<p>How to load new attribute : in Magento the new attribute is defined by two database fields (or attributes) : new from and new to .</p>
<ul>
<li>Using these parameters in list.phtml requires you to modify the attribute set returned by the <strong>Mage_Catalog_Block_Product_List</strong> class to be found in app\code\core\Mage\Catalog\Block\Product\List.php</li>
<li>in function _getProductCollection, paste the following line<br />
$this-&gt;_productCollection<br />
-&gt;addAttributeToSelect(&#8217;news_from_date&#8217;)<br />
-&gt;addAttributeToSelect(&#8217;news_to_date&#8217;);</li>
<li>obvisouly this comes just after the product collection definition around line 75 of the List.php<br />
$this-&gt;_productCollection = $layer-&gt;getProductCollection();</li>
<li>your list.phtml template now has access to the data and checking that a product is new is as simple as performing PHP based date comparisons. We provide here basic comparison that will only work for products where both news_from and news_to have been filled. Add the following PHP code somewhere in your productcollection loop and the work is done !<br />
<strong>$now = date(&#8221;Y-m-d&#8221;);<br />
$newsFrom= substr($_product-&gt;getData(&#8217;news_from_date&#8217;),0,10);<br />
$newsTo=  substr($_product-&gt;getData(&#8217;news_to_date&#8217;),0,10);<br />
if ($now&gt;=$newsFrom &amp;&amp; $now&lt;=$newsTo)<br />
{?&gt; &lt;h3 class=&#8221;nouveauteProductList&#8221; &gt;NEW PRODUCT!&lt;h3&gt;&lt;?};<br />
?&gt;</strong></li>
</ul>
<p><strong><a href="http://www.ruedesiam.com">This hack will be used on RueDeSiam&#8217;s website (to be released next month,bookmark it now!)</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/03/magento-product-display-new-product-icon-on-product-list/740/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Magento product page :  how to display other  products from same category</title>
		<link>http://www.webmasterbulletin.net/2009/02/magento-product-page-how-to-display-other-products-from-same-category/647</link>
		<comments>http://www.webmasterbulletin.net/2009/02/magento-product-page-how-to-display-other-products-from-same-category/647#comments</comments>
		<pubDate>Sun, 15 Feb 2009 13:48:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E commerce]]></category>
		<category><![CDATA[mage]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=647</guid>
		<description><![CDATA[Magento comes with a lot of product relationship features :  implemented as selective lists maintained for each product by the shop owner, related / cross selling and up selling backend features allow some sort of manual product linking that displays product associations on the front end. For example related products are displayed by default in [...]]]></description>
			<content:encoded><![CDATA[<p>Magento comes with a lot of product relationship features :  implemented as selective lists maintained for each product by the shop owner, related / cross selling and up selling backend features allow some sort of manual product linking that displays product associations on the front end. For example related products are displayed by default in the product page right column, while upsell / crosssell products are displayed on the shopping cart page. These 3 types of product associations are well explained on <a href="http://inchoo.net/ecommerce/magento/related-products-up-sells-cross-sells-in-magento/" target="_blank">inchoo&#8217;s blog</a>, and  on magento &#8217;s <a href="http://www.magentocommerce.com/knowledge-base/entry/how-do-i-set-up-product-relations" target="_blank">knowledge base</a> you&#8217;ll find user instructions on how to setup   product relationship in the backend.</p>
<p>What we aim here is to setup an automatic  display of related products on a product view page, via the categories they belong to.  We build two loops : one that  gets categories the product belongs to, and another one inside that gets products of each category.</p>
<p><strong>How to setup category related products in Product view :</strong> </p>
<ol>
<li>add the following code somewhere in default\template\catalog\product\view.phtml </li>
<li>Configure the category query according to your catalog by uncommenting the following  :
<ul>
<li>  ->setPage(1, 1) : selects only one category</li>
<li> ->addFieldToFilter(&#8217;level&#8217;,&#8221;3&#8243;)	 : selects only  3rd level categories </li>
<li> ->addFieldToFilter(&#8217;parent_id&#8217;,&#8221;3&#8243;)	: select only child categories of no 3</li>
<li> ->setOrder(&#8221;level&#8221;) : combined by setPage, returns the lowest level category </li>
</ul>
<li>please that the product loop uses the $_product variable, which can be dangerous because this name is widely used. We use it here for comodity reasons because I just took toe display code from Magento&#8217;s product list view </li>
</li>
</ol>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$_product</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="co1">// get collection of categories this product is associated with</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$categories</span> =<span class="re0">$_product</span>-&gt;<span class="me1">getCategoryCollection</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="co1">// &nbsp;-&gt;setPage(1, 1)</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;<span class="co1">//-&gt;addFieldToFilter(&#8217;level&#8217;,&quot;3&quot;)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="co1">//-&gt;addFieldToFilter(&#8217;parent_id&#8217;,&quot;3&quot;)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="co1">//-&gt;setOrder(&quot;level&quot;)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;-&gt;<span class="me1">load</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li2">
<div class="de2"><span class="co1">// if the product is associated with any category</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$categories</span>-&gt;<span class="me1">count</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> </div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">foreach</span> <span class="br0">&#40;</span><span class="re0">$categories</span> <span class="kw1">as</span> <span class="re0">$_category</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$cur_category</span> = Mage::<span class="me2">getModel</span><span class="br0">&#40;</span><span class="st0">&#8216;catalog/category&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">load</span><span class="br0">&#40;</span><span class="re0">$_category</span>-&gt;<span class="me1">getId</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">?&gt;&lt;div style=<span class="st0">&quot;clear:both&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;h2&gt;Dans la même collection :<span class="kw2">&lt;?</span>=<span class="re0">$cur_category</span>-&gt;<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span>?&gt;&lt;/h2&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;/div&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;?<span class="re0">$products</span> = Mage::<span class="me2">getResourceModel</span><span class="br0">&#40;</span><span class="st0">&#8216;catalog/product_collection&#8217;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">-&gt;<span class="me1">addCategoryFilter</span><span class="br0">&#40;</span><span class="re0">$_category</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2">-&gt;<span class="me1">addAttributeToSelect</span><span class="br0">&#40;</span><span class="st0">&#8217;small_image&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw1">foreach</span> <span class="br0">&#40;</span> <span class="re0">$products</span> <span class="kw1">as</span> <span class="re0">$productModel</span> <span class="br0">&#41;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#123;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$_product</span> = Mage::<span class="me2">getModel</span><span class="br0">&#40;</span><span class="st0">&#8216;catalog/product&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">load</span><span class="br0">&#40;</span><span class="re0">$productModel</span>-&gt;<span class="me1">getId</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width</span>=<span class="nu0">135</span>; <span class="re0">$height</span>=<span class="nu0">135</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$_imageUrl</span> = &nbsp;<span class="re0">$this</span>-&gt;<span class="me1">helper</span><span class="br0">&#40;</span><span class="st0">&#8216;catalog/image&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">init</span><span class="br0">&#40;</span><span class="re0">$productModel</span>, <span class="st0">&#8217;small_image&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">resize</span><span class="br0">&#40;</span><span class="re0">$width</span>, <span class="re0">$height</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;div <span class="kw2">class</span>=<span class="st0">&quot;product-shop&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;&lt;h5&gt;&lt;a href=<span class="st0">&quot;&lt;?php echo $_product-&gt;getProductUrl() ?&gt;&quot;</span> title=<span class="st0">&quot;&lt;?php echo $this-&gt;htmlEscape($_product-&gt;getName()) ?&gt;&quot;</span>&gt;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">&lt;?php</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$this</span>-&gt;<span class="me1">htmlEscape</span><span class="br0">&#40;</span><span class="re0">$_product</span>-&gt;<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>?&gt;&lt;/a&gt;&lt;/h5&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp;&lt;img src=<span class="kw2">&lt;?</span>=<span class="re0">$_imageUrl</span> <span class="kw2">?&gt;</span> width=<span class="st0">&quot;&lt;?=$width?&gt;&quot;</span> height=<span class="st0">&quot;&lt;?=$height?&gt;&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$this</span>-&gt;<span class="me1">getPriceHtml</span><span class="br0">&#40;</span><span class="re0">$_product</span>, <span class="kw2">true</span><span class="br0">&#41;</span> <span class="kw2">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw2">&lt;?php</span> <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$_product</span>-&gt;<span class="me1">isSaleable</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>: <span class="kw2">?&gt;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;&lt;button <span class="kw2">class</span>=<span class="st0">&quot;form-button&quot;</span> onclick=<span class="st0">&quot;setLocation(&#8217;&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;&#8217;)&quot;</span>&gt;&lt;span&gt;&lt;?php <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$this</span>-&gt;__<span class="br0">&#40;</span><span class="st0">&#8216;Add to Cart&#8217;</span><span class="br0">&#41;</span> ?&gt;&lt;/span&gt;&lt;/button&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">&lt;?php</span> <span class="kw1">else</span>: <span class="kw2">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;div <span class="kw2">class</span>=<span class="st0">&quot;out-of-stock&quot;</span>&gt;&lt;?php <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$this</span>-&gt;__<span class="br0">&#40;</span><span class="st0">&#8216;Out of stock&#8217;</span><span class="br0">&#41;</span> ?&gt;&lt;/div&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw2">&lt;?php</span> <span class="kw1">endif</span>; <span class="kw2">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;div <span class="kw2">class</span>=<span class="st0">&quot;clear&quot;</span>&gt;&lt;/div&gt;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &lt;div <span class="kw2">class</span>=<span class="st0">&quot;description&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">&lt;?php</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <a href="http://www.php.net/nl2br"><span class="kw3">nl2br</span></a><span class="br0">&#40;</span><span class="re0">$_product</span>-&gt;<span class="me1">getShortDescription</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="kw2">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;a href=<span class="st0">&quot;&lt;?php echo $_product-&gt;getProductUrl() ?&gt;&quot;</span> title=<span class="st0">&quot;&lt;?php echo $this-&gt;htmlEscape($_product-&gt;getName()) ?&gt;&quot;</span>&gt;&lt;small&gt;&lt;?php <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$this</span>-&gt;__<span class="br0">&#40;</span><span class="st0">&#8216;Learn More&#8217;</span><span class="br0">&#41;</span> ?&gt;&lt;/small&gt;&lt;/a&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/div&gt;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">&lt;?</span> &nbsp;<span class="br0">&#125;</span> &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">?&gt;</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/02/magento-product-page-how-to-display-other-products-from-same-category/647/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
