<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3331373492104780621</id><updated>2024-09-07T20:12:50.098-07:00</updated><category term="display category in homepage"/><category term="magento"/><category term="magento category"/><category term="jquery"/><category term="magento backend"/><category term="IE Conditional Comment"/><category term="Image rotator"/><category term="Magento::getBaseUrl"/><category term="cannot login backend"/><category term="category with images on homepage"/><category term="check user login"/><category term="cookie problem"/><category term="custom breadcrumbs"/><category term="custom pagination"/><category term="custom tab"/><category term="customize layered navigation"/><category term="debugging"/><category term="display all products in homepage with pagination"/><category term="display brand logo using brand name"/><category term="display cms pages in homepage via static blocks"/><category term="dreamweaver"/><category term="geoip"/><category term="header slider"/><category term="image switcher"/><category term="inchoo"/><category term="javascript for shadowbox"/><category term="layered navigation"/><category term="magento administration"/><category term="magento cms static blocks"/><category term="magento configurable menu"/><category term="magento email"/><category term="magento homepage category"/><category term="magento pagination"/><category term="magento permission"/><category term="magento phtml"/><category term="magento product image in email"/><category term="magento products"/><category term="magento programming"/><category term="magento quantity increment"/><category term="magento quick fix"/><category term="magento session"/><category term="magento template"/><category term="magento transaction email"/><category term="magento using firefox"/><category term="media.phtml"/><category term="onepage checkout"/><category term="product view"/><category term="prototype"/><category term="shadowbox disable background scrolling"/><category term="special price page"/><category term="store switcher"/><category term="zend"/><title type='text'>Magento code snippets etc</title><subtitle type='html'>This blog is used as a resource material for me and my Magento co-workers... You are also welcome to post your comments and suggestions.. Godbless!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-6773644737604141027</id><published>2012-04-24T20:31:00.000-07:00</published><updated>2012-04-24T20:38:50.914-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="category with images on homepage"/><category scheme="http://www.blogger.com/atom/ns#" term="display category in homepage"/><title type='text'>Magento add category with images on homepage</title><content type='html'>if you would like to add category titles with images on the front page, just follow the steps:&lt;br /&gt;
&lt;br /&gt;
place this snippet on your homepage cms page:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;{{block type=&quot;core/template&quot; name=&quot;homepage&quot; template=&quot;catalog/category/homepagecategory.phtml&quot;}}
&lt;/pre&gt;
&lt;br /&gt;
then place this code in &lt;b&gt;app/code/design/frontend/YOUR_PACKAGE/YOUR_TEMPLATE/catalog/category/homepagecategory.phtml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php
 $currcatId = 3;
 if($currcatId != NULL)
    {
  $collection = Mage::getModel(&#39;catalog/category&#39;)-&amp;gt;getCategories($currcatId);
  $ctr = 0;
  foreach($collection as $subcat)
  {
      //limits the categories to be shown on home page to 6 categories
      if ($ctr &amp;lt; 6)
   if($subcat-&amp;gt;getIsActive())
   {
       $category = Mage::getModel(&#39;catalog/category&#39;)-&amp;gt;load($subcat-&amp;gt;getEntityId());
       $ctr++;
       if (strtolower($category-&amp;gt;getName()) == &quot;overige lampen&quot;) 
       {
       }
    else
   {
?&amp;gt;

&amp;lt;div class=&quot;sub-category-container&quot; style=&quot;margin-right:&amp;lt;?php if(($ctr % 2) == 0) {echo &quot;0&quot;;} else {echo &quot;8px&quot;;} ?&amp;gt;; margin-bottom:10px;&quot; &amp;gt;
 &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getBaseUrl() . $category-&amp;gt;getUrlKey() ?&amp;gt;&quot; style=&quot;background:none; border:none;&quot;&amp;gt;
  &amp;lt;div&amp;gt;
     &amp;lt;?php if($_imgUrl = $category-&amp;gt;getImageUrl()): ?&amp;gt;
   &amp;lt;img src=&quot;&amp;lt;?php echo $_imgUrl; ?&amp;gt;&quot; border=&quot;0&quot; /&amp;gt;
     &amp;lt;?php else:?&amp;gt;
   &amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;getSkinUrl(&#39;images/lampen/placeholder.jpg&#39;) ?&amp;gt;&quot; border=&quot;0&quot; width=&quot;185px&quot; height=&quot;185px&quot; /&amp;gt;
     &amp;lt;?php endif; ?&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;div&amp;gt;
   &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getBaseUrl() . $category-&amp;gt;getUrlKey() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $category-&amp;gt;getName(); ?&amp;gt;&amp;lt;/a&amp;gt;
  &amp;lt;/div&amp;gt;
 &amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;?php
     }
   }
  }
 }
?&amp;gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/6773644737604141027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2012/04/magento-add-category-with-images-on.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6773644737604141027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6773644737604141027'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2012/04/magento-add-category-with-images-on.html' title='Magento add category with images on homepage'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-71685957833498619</id><published>2012-04-24T19:34:00.000-07:00</published><updated>2012-04-24T19:34:28.187-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cannot login backend"/><category scheme="http://www.blogger.com/atom/ns#" term="cookie problem"/><category scheme="http://www.blogger.com/atom/ns#" term="magento quick fix"/><title type='text'>Magento 1.6 cannot login on admin</title><content type='html'>I have a sample Magento 1.6.2 installation wherein I test sample codes, install/test extension and also it acts as a quick reference whenever I&#39;m not sure of anything on the admin area.&lt;br /&gt;
As you have guessed I tried loggin in one fine day and pooof! I can&#39;t login.. Tried almost anything (eg. clearing cache, session, locks ... using other web browser) but it still wont log me in..&lt;br /&gt;
&lt;br /&gt;
Tried searching for a solution and thank God I found one on &lt;a href=&quot;http://www.phpgenious.com/2010/02/cant-login-into-admin-panel-of-magento-problem-and-solution/&quot; target=&quot;_blank&quot;&gt;phpgenious&lt;/a&gt;.. &lt;br /&gt;
It says that this is a cookie problem because Magento cannot create a cookie on your site, so here&#39;s the solution. (this solution worked for me..)&lt;br /&gt;
&lt;br /&gt;
COPY app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on app/code/&lt;b&gt;local&lt;/b&gt;/Mage/Core/Model/Session/Abstract/Varien.php (&lt;b&gt;so that it will not be overwritten when you upgrade&lt;/b&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;        // session cookie params
        $cookieParams = array(
            &#39;lifetime&#39; =&amp;gt; $cookie-&amp;gt;getLifetime(),
            &#39;path&#39;     =&amp;gt; $cookie-&amp;gt;getPath()
            &#39;domain&#39;   =&amp;gt; $cookie-&amp;gt;getConfigDomain(),
            &#39;secure&#39;   =&amp;gt; $cookie-&amp;gt;isSecure(),
            &#39;httponly&#39; =&amp;gt; $cookie-&amp;gt;getHttponly()
        ); 
&lt;/pre&gt;
&lt;br /&gt;
and replace it with:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;        // session cookie params
        $cookieParams = array(
            &#39;lifetime&#39; =&amp;gt; $cookie-&amp;gt;getLifetime(),
            &#39;path&#39;     =&amp;gt; $cookie-&amp;gt;getPath()
           // &#39;domain&#39;   =&amp;gt; $cookie-&amp;gt;getConfigDomain(),
           // &#39;secure&#39;   =&amp;gt; $cookie-&amp;gt;isSecure(),
           // &#39;httponly&#39; =&amp;gt; $cookie-&amp;gt;getHttponly()
        ); 
&lt;/pre&gt;
&lt;br /&gt;
What we did here is we disabled the cookies check that Magento do when we try to login.. &lt;b&gt;This should not be used on live site&lt;/b&gt; because cookies will work if you have a true domain.</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/71685957833498619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2012/04/magento-16-cannot-login-on-admin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/71685957833498619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/71685957833498619'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2012/04/magento-16-cannot-login-on-admin.html' title='Magento 1.6 cannot login on admin'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-7823121621789158658</id><published>2011-04-12T22:21:00.001-07:00</published><updated>2011-09-01T00:47:51.562-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="magento quantity increment"/><category scheme="http://www.blogger.com/atom/ns#" term="product view"/><title type='text'>Magento - How to make a quantity increment in product view?</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img height=&quot;46&quot; src=&quot;http://lh3.ggpht.com/_qU_PHLLcrCk/TaUiryeSQ3I/AAAAAAAAACo/umSewQsvr9g/%5BUNSET%5D.jpg?imgmax=800&quot; style=&quot;max-width: 800px;&quot; width=&quot;200&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;br /&gt;
Files needed, Files to be edited:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;JQuery (probably the latest version, better if minified)&lt;/li&gt;
&lt;li&gt;jincrement.js (this is our own js.. you can change its name as you like)&lt;/li&gt;
&lt;li&gt;jQuery.noConflict()&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;styles.css (styling for the increment buttons)&lt;/li&gt;
&lt;li&gt;layout/catalog.xml (this is where we&#39;ll reference our js, just being clean)&lt;/li&gt;
&lt;li&gt;template/catalog/product/view/addtocart.phtml (we&#39;ll put a div here)&lt;/li&gt;
&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;create a file with the name jincrement.js and put this code on it..&lt;/li&gt;
&lt;pre class=&quot;brush: js&quot;&gt;jQuery(document).ready(function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp; var $j = jQuery.noConflict();
&amp;nbsp;&amp;nbsp;&amp;nbsp; $j(&quot;div.quantity&quot;).append(&#39;&amp;lt;input type=&quot;button&quot; value=&quot;+&quot; id=&quot;add1&quot; class=&quot;plus&quot; /&amp;gt;&#39;).prepend(&#39;&amp;lt;input type=&quot;button&quot; value=&quot;-&quot; id=&quot;minus1&quot; class=&quot;minus&quot; /&amp;gt;&#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$j(&quot;.plus&quot;).click(function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var currentVal = parseInt($j(this).prev(&quot;.qty&quot;).val());
        if (!currentVal || currentVal==&quot;&quot; || currentVal == &quot;NaN&quot;) 
           currentVal = 0;
           $j(this).prev(&quot;.qty&quot;).val(currentVal + 1);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$j(&quot;.minus&quot;).click(function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var currentVal = parseInt($j(this).next(&quot;.qty&quot;).val());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (currentVal == &quot;NaN&quot;) 
            currentVal = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (currentVal &amp;gt; 0){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $j(this).next(&quot;.qty&quot;).val(currentVal - 1);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});
});&lt;/pre&gt;&lt;li&gt;Place the JQuery and jincrement.js on js/&lt;/li&gt;
&lt;li&gt;in catalog.xml &lt;/li&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;!--
Product view
--&amp;gt;
&amp;lt;reference name=&quot;head&quot;&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;action method=&quot;addJs&quot;&amp;gt;&amp;lt;script&amp;gt;jquery.min.js&amp;lt;/script&amp;gt;&amp;lt;/action&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;action method=&quot;addJs&quot;&amp;gt;&amp;lt;script&amp;gt;jquery.noconflict.js&amp;lt;/script&amp;gt;&amp;lt;/action&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;action method=&quot;addJs&quot;&amp;gt;&amp;lt;script&amp;gt;jquery.jincrement.js&amp;lt;/script&amp;gt;&amp;lt;/action&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... OTHER CODES HERE ...
&amp;lt;/reference&amp;gt;&lt;/pre&gt;&lt;li&gt;in addtocart.phtml&lt;br /&gt;
in line 34, enclose in &amp;lt;div class=&quot;quantity&quot;&amp;gt;&amp;lt;/div&amp;gt; the input tag...&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;style using styles.css.. this is my code for styling..&lt;/li&gt;
&lt;pre class=&quot;brush: css&quot;&gt;div.add-to-cart div.quantity input#minus1{
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #A1A1A1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 1px solid #BBB;
&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 3px 0 0 3px;
&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 3px 0 0 3px;
&amp;nbsp;&amp;nbsp;&amp;nbsp; float: left;
&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 20px;
&amp;nbsp;&amp;nbsp;&amp;nbsp; margin-right: 1px;
&amp;nbsp;&amp;nbsp;&amp;nbsp; padding-left: 2px;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor: pointer;
}
div.add-to-cart div.quantity input#minus1:hover{
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #CCC;
&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 1px solid #DDD;
}
div.add-to-cart div.quantity input#add1{
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #A1A1A1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 1px solid #BBB;
&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 0 3px 3px 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 0 3px 3px 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 20px;
&amp;nbsp;&amp;nbsp;&amp;nbsp; vertical-align: top;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor: pointer;
}
div.add-to-cart div.quantity input#add1:hover{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #CCC;
&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 1px solid #DDD;
}
div.add-to-cart div.quantity{
&amp;nbsp;&amp;nbsp;&amp;nbsp; margin-bottom: 5px;
&amp;nbsp;&amp;nbsp;&amp;nbsp; float: right;
}&lt;/pre&gt;&lt;/ol&gt;and that&#39;s it!&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/7823121621789158658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2011/04/magento-how-to-make-quantity-increment.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/7823121621789158658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/7823121621789158658'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2011/04/magento-how-to-make-quantity-increment.html' title='Magento - How to make a quantity increment in product view?'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_qU_PHLLcrCk/TaUiryeSQ3I/AAAAAAAAACo/umSewQsvr9g/s72-c/%5BUNSET%5D.jpg?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-3731503778275800296</id><published>2011-03-28T01:37:00.001-07:00</published><updated>2011-09-01T00:49:44.062-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debugging"/><category scheme="http://www.blogger.com/atom/ns#" term="zend"/><title type='text'>Magento Debugging Tips</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;Referenced from &lt;a href=&quot;http://inchoo.net/ecommerce/magento/basic-php-stuff-every-frontend-magento-developer-should-know/#more-4203&quot; target=&quot;_blank&quot;&gt;Inchoo&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Snippet 1: Check if variable is object and of which class&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php Zend_Debug::dump(get_class($this), &#39;get_class&#39;) ?&amp;gt;
&amp;lt;?php
/**
 * Once you do get_class you will get a class name.
 * With class name you can do something like
 * $this = new Mage_Page_Block_Html_Header();
 * then IDE will give you autocomplete on things like &quot;$this-&amp;gt;&quot;
 *
 * Just remember to comment the out the
 * //$this = new Mage_Page_Block_Html_Header();
 * once you are done
 */
?&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Snippet 2: Do a basic dump of variable to see its &quot;content&quot;/value&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php Zend_Debug::dump($this-&amp;gt;debug(), &#39;debug&#39;) ?&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Snippet 3: Read the value of object properties/attributes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
(Note that $_product var is just example, it can be any Magento/Varien object)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php Zend_Debug::dump($_product-&amp;gt;getData(&#39;attribute_name&#39;)) ?&amp;gt; &lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Snippet 4: Read the value of object properties/attributes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
(Does the same thing as Snippet 3)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php Zend_Debug::dump($_product-&amp;gt;getAttributeName()) ?&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Snippet 5: Compare the value of attribute/property to some other value&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php if($_product-&amp;gt;getSku() == &#39;sku-xxx-ppp-222&#39;): ?&amp;gt;
    Ouput something only if product Sku is equal to &#39;sku-xxx-ppp-222&#39;.
&amp;lt;?php endif; ?&amp;gt; &lt;/pre&gt;&lt;br /&gt;
S&lt;b&gt;nippet 6: Loop trough Magento collection object&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
(Check if something is a collection, if we can iterate trough it)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php if($someVar instanceof Varien_Data_Collection): ?&amp;gt;
    &lt;ul&gt;&amp;lt;?php foreach($someVar as $k =&amp;gt; $v): ?&amp;gt;
&lt;li&gt;Some value: &amp;lt; ?php echo $v ?&amp;gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/3731503778275800296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2011/03/magento-debugging-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/3731503778275800296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/3731503778275800296'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2011/03/magento-debugging-tips.html' title='Magento Debugging Tips'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-1381843700630127113</id><published>2011-03-22T23:26:00.001-07:00</published><updated>2011-09-01T01:15:24.585-07:00</updated><title type='text'>How to automate related products selection in Magento?</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;This mod does the following&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;fetch all the products in a category&lt;/li&gt;
&lt;li&gt;dispaly them below the main picture in product view&lt;/li&gt;
&lt;li&gt;no need to set the related products (if your products are within the same category)&lt;/li&gt;
&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;go to app/design/frontend/your-package/your-theme/template/catalog/list/related.phtml ( make a backup of this one )&lt;/li&gt;
&lt;li&gt;overwrite all the codes in your related.phtml with this one&lt;/li&gt;
&lt;/ol&gt;&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php
$_product = $this-&amp;gt;getProduct();
if ($_product) {
   // get collection of categories this product is associated with
   $categories = $_product-&amp;gt;getCategoryCollection()
   -&amp;gt;setPage(1, 1)
   -&amp;gt;addFieldToFilter(&#39;parent_id&#39;,&quot;2&quot;)
   -&amp;gt;load();

   // if the product is associated with any category
   if ($categories-&amp;gt;count())
      foreach ($categories as $_category){
         $cur_category = Mage::getModel(&#39;catalog/category&#39;)-&amp;gt;load($_category-&amp;gt;getId());
         $prodCollection = Mage::getResourceModel(&#39;catalog/product_collection&#39;)-&amp;gt;addCategoryFilter($_category);
         Mage::getSingleton(&#39;catalog/product_status&#39;)
           -&amp;gt;addVisibleFilterToCollection($prodCollection);
         Mage::getSingleton(&#39;catalog/product_visibility&#39;)
           -&amp;gt;addVisibleInCatalogFilterToCollection($prodCollection);
         if($prodCollection-&amp;gt;count() &amp;gt; 1) :
             ?&amp;gt;&amp;lt;div class=&quot;related-product&quot;&amp;gt;
               &amp;lt;div class=&quot;block-title&quot;&amp;gt;
                 &amp;lt;h4&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;More from this artist...&#39;) ?&amp;gt;&amp;lt;/h4&amp;gt;
               &amp;lt;/div&amp;gt;
             &amp;lt;?php $products = Mage::getResourceModel(&#39;catalog/product_collection&#39;)
             -&amp;gt;addCategoryFilter($_category)
             -&amp;gt;addAttributeToSelect(&#39;small_image&#39;); ?&amp;gt;
&amp;lt;ol class=&quot;mini-products-list&quot; id=&quot;block-related&quot;&amp;gt;
 &amp;lt;div class=&quot;block-content&quot;&amp;gt;
&amp;lt;?php foreach ( $products as $productModel ){
$_product = Mage::getModel(&#39;catalog/product&#39;)-&amp;gt;load($productModel-&amp;gt;getId());
$width=100; $height=100;
$_imageUrl = $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($productModel, &#39;small_image&#39;)-&amp;gt;resize($width, $height);
$currentUrl = $this-&amp;gt;helper(&#39;core/url&#39;)-&amp;gt;getCurrentUrl();                    //SPLIT THE URL FOR QUERY STRING&amp;lt;br /&amp;gt;
$rel_product = explode( &quot;?&quot;, $currentUrl); 
//SPLIT THE URL FOR CATEGORY
$cprod_url = explode( &quot;/&quot;, $_product-&amp;gt;getProductUrl());                    //ASSIGN THE STRIPPED URL TO A VARIABLE
$isyan = $cprod_url[0].&#39;//&#39;.$cprod_url[2].&#39;/&#39;.$cprod_url[4];                    //WE WILL HIDE THE PRODUCT THAT IS CURRENTLY BEING VIEWED FROM DISPLAYING ON THE RELATED PRODUCTS
if( $_product-&amp;gt;getProductUrl() != $rel_product[0] &amp;amp;&amp;amp; $isyan != $rel_product[0]){
?&amp;gt;
 &amp;lt;li class=&quot;item&quot;&amp;gt;
&amp;lt;a href=&quot;&amp;lt;?php echo $isyan ?&amp;gt;&quot; class=&quot;product-image&quot; title=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_product-&amp;gt;getName()) ?&amp;gt;&quot;&amp;gt;&amp;lt;img src=&amp;lt;?=$_imageUrl ?&amp;gt; width=&quot;&amp;lt;?=$width?&amp;gt;&quot; height=&quot;&amp;lt;?=$height?&amp;gt;&quot;/&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;/li&amp;gt;
 &amp;lt;?php } 
}
?&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/ol&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;?php&amp;nbsp;&amp;nbsp; endif; 
}
}
?&amp;gt;&lt;/pre&gt;Hope this helps! Godbless!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/1381843700630127113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2011/03/how-to-automate-related-products.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1381843700630127113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1381843700630127113'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2011/03/how-to-automate-related-products.html' title='How to automate related products selection in Magento?'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-9052971173842319534</id><published>2011-02-23T01:22:00.001-08:00</published><updated>2011-09-01T02:07:35.840-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="custom tab"/><category scheme="http://www.blogger.com/atom/ns#" term="inchoo"/><category scheme="http://www.blogger.com/atom/ns#" term="onepage checkout"/><title type='text'>Magento - How to insert a custom tab in One Page Checkout?</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;I found a nice extension from &lt;a href=&quot;http://inchoo.net/ecommerce/magento/adding-a-new-tab-under-one-page-checkout-full-working-module/&quot; target=&quot;_blank&quot;&gt;Inchoo&lt;/a&gt; which will insert a customizable tab in Magento OnePage Checkout. So I used this extension and extended it a little bit to fit the requirements.&lt;br /&gt;
&lt;br /&gt;
What I want to do is to add a Terms &amp;amp; Conditions tab before placing an order. So here&#39;s the code.&lt;br /&gt;
&lt;b&gt;/home/donnafiera/magento/app/design/frontend/default/default/template/checkout/onepage/heared4us.phtml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;form id=&quot;co-heared4us-form&quot; action=&quot;&quot;&amp;gt;
  &amp;lt;?php echo &quot;I have read the &amp;lt;a href=&#39;&quot;.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).&quot;test.pdf&#39; target=&#39;_Blank&#39;&amp;gt;TERMS AND CONDITIONS&amp;lt;/a&amp;gt;&quot;; ?&amp;gt;
  &amp;lt;label&amp;gt;&amp;lt;input id=&quot;chkaccept&quot; type=&quot;checkbox&quot; name=&quot;useraccept&quot; value=&quot;yes&quot; /&amp;gt;&amp;amp;nbsp;Accept&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/pre&gt;&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
  function formValidation(oEvent) {
  oEvent = oEvent || window.event;
  var txtField = oEvent.target || oEvent.srcElement;
  var t1ck=true;
  if(!document.getElementById(&quot;chkaccept&quot;).checked ){ t1ck=false;}
    if(t1ck){document.getElementById(&quot;btnTerms&quot;).disabled = false; }
    else{document.getElementById(&quot;btnTerms&quot;).disabled = true; }
  }

window.onload = function () {
var btnTerms = document.getElementById(&quot;btnTerms&quot;);
var chkaccept=document.getElementById(&quot;chkaccept&quot;);
var t1ck=false;
document.getElementById(&quot;btnTerms&quot;).disabled = true;
chkaccept.onclick = formValidation;
}
&amp;lt;/script&amp;gt; &lt;/pre&gt;&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;div class=&quot;button-set&quot;&amp;gt;
&amp;lt;p class=&quot;required&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;* Required Fields&#39;) ?&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div id=&quot;heared4us-buttons-container&quot;&amp;gt;
&amp;lt;button id=&quot;btnTerms&quot; type=&quot;button&quot; class=&quot;form-button right&quot; onclick=&quot; heared4us.save();&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Continue&#39;) ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/button&amp;gt;
&amp;lt;span id=&quot;heared4us-please-wait&quot; style=&quot;display:none;&quot; class=&quot;opc-please-wait&quot;&amp;gt;
&amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;getSkinUrl(&#39;images/opc-ajax-loader.gif&#39;) ?&amp;gt;&quot; class=&quot;v-middle&quot; alt=&quot;&quot; /&amp;gt; &amp;amp;nbsp; &amp;lt;?php echo $this-&amp;gt;__(&#39;Loading next step...&#39;) ?&amp;gt; &amp;amp;nbsp;
&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/9052971173842319534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2011/02/magento-how-to-insert-custom-tab-in-one.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/9052971173842319534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/9052971173842319534'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2011/02/magento-how-to-insert-custom-tab-in-one.html' title='Magento - How to insert a custom tab in One Page Checkout?'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-6118972403027776967</id><published>2011-02-06T23:14:00.001-08:00</published><updated>2011-09-01T02:10:40.307-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="special price page"/><title type='text'>Magento - How to create a special price page? (with new products first)</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;I&#39;ve created a Magento site for a client who wants to have a special price page, wherein she could put products having special price/discounted price.. &lt;br /&gt;
Requirements:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;app/code/local/Mage/Catalog/Block/Product/Special.php&lt;/li&gt;
&lt;li&gt;app/design/frontend/default/donna/template/catalog/product/special.phtml&lt;/li&gt;
&lt;li&gt;Magento backend - CMS&amp;gt;Pages&amp;gt;create-a-special-price-page&lt;/li&gt;
&lt;/ul&gt;&lt;u&gt;&lt;b&gt;Special.php&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
=========================================&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php
class Mage_Catalog_Block_Product_Special extends Mage_Catalog_Block_Product_List
{
   function get_prod_count()
   {
      //unset any saved limits
      Mage::getSingleton(&#39;catalog/session&#39;)-&amp;gt;unsLimitPage();
      return (isset($_REQUEST[&#39;limit&#39;])) ? intval($_REQUEST[&#39;limit&#39;]) : 9;
   }// get_prod_count
   function get_cur_page()
   {
      return (isset($_REQUEST[&#39;p&#39;])) ? intval($_REQUEST[&#39;p&#39;]) : 1;
   }// get_cur_page
   /**
    * Retrieve loaded category collection
    *
    * @return Mage_Eav_Model_Entity_Collection_Abstract
   **/
   protected function _getProductCollection()
   {
        $todayDate  = Mage::app()-&amp;gt;getLocale()-&amp;gt;date()-&amp;gt;toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
        $tomorrow = mktime(0, 0, 0, date(&#39;m&#39;), date(&#39;d&#39;)+1, date(&#39;y&#39;));
        $dateTomorrow = date(&#39;m/d/y&#39;, $tomorrow);
        $collection = Mage::getResourceModel(&#39;catalog/product_collection&#39;);
        $collection-&amp;gt;setVisibility(Mage::getSingleton(&#39;catalog/product_visibility&#39;)-&amp;gt;getVisibleInCatalogIds());
        $collection = $this-&amp;gt;_addProductAttributesAndPrices($collection)
         -&amp;gt;addStoreFilter()
         -&amp;gt;addAttributeToSort(&#39;entity_id&#39;, &#39;desc&#39;) //&lt;b&gt;THIS WILL SHOW THE LATEST PRODUCTS FIRST&lt;/b&gt;
         -&amp;gt;addAttributeToFilter(&#39;special_from_date&#39;, array(&#39;date&#39; =&amp;gt; true, &#39;to&#39; =&amp;gt; $todayDate))
         -&amp;gt;addAttributeToFilter(&#39;special_to_date&#39;, array(&#39;or&#39;=&amp;gt; array(0 =&amp;gt; array(&#39;date&#39; =&amp;gt; true, &#39;from&#39; =&amp;gt; $dateTomorrow), 1 =&amp;gt; array(&#39;is&#39; =&amp;gt; new Zend_Db_Expr(&#39;null&#39;)))), &#39;left&#39;)
         -&amp;gt;setPageSize($this-&amp;gt;get_prod_count())
         -&amp;gt;setCurPage($this-&amp;gt;get_cur_page());
        $this-&amp;gt;setProductCollection($collection);
        return $collection;
   }// _getProductCollection
}// Mage_Catalog_Block_Product_New
?&amp;gt; &lt;/pre&gt;==============================================&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;special.phtml&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
==============================================&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php if (($_products = $this-&amp;gt;getProductCollection()) &amp;amp;&amp;amp; $_products-&amp;gt;getSize()): ?&amp;gt;
&amp;lt;div class=&quot;widget widget-new-products&quot;&amp;gt;
    &amp;lt;div class=&quot;widget-title&quot;&amp;gt;
        &amp;lt;h2&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Special Product&#39;) ?&amp;gt;&amp;lt;/h2&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class=&quot;widget-products&quot;&amp;gt;
    &amp;lt;?php $_columnCount = $this-&amp;gt;getColumnCount(); ?&amp;gt;
        &amp;lt;?php $i=0; foreach ($_products-&amp;gt;getItems() as $_product): ?&amp;gt;
        &amp;lt;?php if ($i++%$_columnCount==0): ?&amp;gt;
        &amp;lt;ul class=&quot;products-grid&quot;&amp;gt;
        &amp;lt;?php endif ?&amp;gt;
            &amp;lt;li class=&quot;item&amp;lt;?php if(($i-1)%$_columnCount==0): ?&amp;gt; first&amp;lt;?php elseif($i%$_columnCount==0): ?&amp;gt; last&amp;lt;?php endif; ?&amp;gt;&quot;&amp;gt;
                    &amp;lt;a href=&quot;&amp;lt;?php echo $_product-&amp;gt;getProductUrl() ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_product-&amp;gt;getName()) ?&amp;gt;&quot; class=&quot;product-image&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($_product, &#39;small_image&#39;) ?&amp;gt;&quot; width=&quot;195px&quot; height=&quot;195px&quot; alt=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_product-&amp;gt;getName()) ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;
                    &amp;lt;h3 class=&quot;product-name&quot;&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $_product-&amp;gt;getProductUrl() ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_product-&amp;gt;getName()) ?&amp;gt;)&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_product-&amp;gt;getName()) ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;
                    &amp;lt;!-- ###### BRANDS EG. BY CHIC ON A MISSION ###### --&amp;gt;
                    &amp;lt;div class=&quot;product-brand&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_product-&amp;gt;getextraline()) ?&amp;gt;&amp;lt;/div&amp;gt;
                    &amp;lt;?php echo $this-&amp;gt;getReviewsSummaryHtml($_product, &#39;short&#39;) ?&amp;gt; 
                    &amp;lt;?php echo $this-&amp;gt;getPriceHtml($_product, true, &#39;-widget-new-grid&#39;) ?&amp;gt;
                &amp;lt;div class=&quot;actions&quot;&amp;gt;
                    &amp;lt;?php if($_product-&amp;gt;isSaleable()): ?&amp;gt;
                        &amp;lt;!-- &amp;lt;button type=&quot;button&quot; title=&quot;&amp;lt;?php /* echo $this-&amp;gt;__(&#39;Add to Cart&#39;) ?&amp;gt;&quot; class=&quot;button btn-cart&quot; onclick=&quot;setLocation(&#39;&amp;lt;?php echo $this-&amp;gt;getAddToCartUrl($_product) ?&amp;gt;&#39;)&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Add to Cart&#39;)*/ ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/button&amp;gt;--&amp;gt;
                    &amp;lt;?php else: ?&amp;gt;
                        &amp;lt;!--&amp;lt;p class=&quot;availability out-of-stock&quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;?php // echo $this-&amp;gt;__(&#39;Out of stock&#39;) ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;--&amp;gt;
                        &amp;lt;div class=&quot;out-of-stock-special&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;getSkinUrl(&#39;images/donna/soldout-overon.png&#39;) ?&amp;gt;&quot; alt=&quot;uitverkocht&quot; width=&quot;50px&quot; /&amp;gt;&amp;lt;/div&amp;gt;
                    &amp;lt;?php endif; ?&amp;gt;
                    &amp;lt;?php /*&amp;lt;ul class=&quot;add-to-links&quot;&amp;gt;
                        &amp;lt;?php if ($this-&amp;gt;helper(&#39;wishlist&#39;)-&amp;gt;isAllow()) : ?&amp;gt;
                            &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;helper(&#39;wishlist&#39;)-&amp;gt;getAddUrl($_product) ?&amp;gt;&quot; class=&quot;link-wishlist&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Add to Wishlist&#39;) ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
                        &amp;lt;?php endif; ?&amp;gt;
                        &amp;lt;?php if($_compareUrl=$this-&amp;gt;getAddToCompareUrl($_product)): ?&amp;gt;
                            &amp;lt;li&amp;gt;&amp;lt;span class=&quot;separator&quot;&amp;gt;|&amp;lt;/span&amp;gt; &amp;lt;a href=&quot;&amp;lt;?php echo $_compareUrl ?&amp;gt;&quot; class=&quot;link-compare&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Add to Compare&#39;) ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
                        &amp;lt;?php endif; ?&amp;gt;
                    &amp;lt;/ul&amp;gt; */ ?&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;/li&amp;gt;
        &amp;lt;?php if ($i%$_columnCount==0 || $i==count($_products)): ?&amp;gt;
        &amp;lt;/ul&amp;gt;
        &amp;lt;?php endif ?&amp;gt;
        &amp;lt;?php endforeach; ?&amp;gt;
        &amp;lt;div class=&quot;toolbar-bottom&quot;&amp;gt;
            &amp;lt;?php // echo $this-&amp;gt;getToolbarBlock()-&amp;gt;setTemplate(&#39;catalog/product/list/ctoolbar.phtml&#39;)-&amp;gt;toHtml(); ?&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;?php endif; ?&amp;gt;  &lt;/pre&gt;========================================&lt;br /&gt;
&lt;br /&gt;
In the CMS Page that you created, click Design tab then in the Page layout&amp;gt;Layout update xml put this code..&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;reference name=&quot;content&quot;&amp;gt;
   &amp;lt;block type=&quot;catalog/product_special&quot; name=&quot;product_special&quot; template=&quot;catalog/product/list.phtml&quot;&amp;gt;
       &amp;lt;block type=&quot;catalog/product_list_toolbar&quot; name=&quot;product_list_toolbar&quot; template=&quot;catalog/product/list/toolbar.phtml&quot;&amp;gt;
              &amp;lt;action method=&quot;setDefaultDirection&quot;&amp;gt;&amp;lt;dir&amp;gt;desc&amp;lt;/dir&amp;gt;&amp;lt;/action&amp;gt;
              &amp;lt;action method=&quot;setDefaultOrder&quot;&amp;gt;&amp;lt;field&amp;gt;entity_id&amp;lt;/field&amp;gt;&amp;lt;/action&amp;gt;
              &amp;lt;block type=&quot;page/html_pager&quot; name=&quot;product_list_toolbar_pager&quot; /&amp;gt;
       &amp;lt;/block&amp;gt;
      &amp;lt;action method=&quot;addColumnCountLayoutDepend&quot;&amp;gt;&amp;lt;layout&amp;gt;three_columns&amp;lt;/layout&amp;gt;&amp;lt;count&amp;gt;3&amp;lt;/count&amp;gt;&amp;lt;/action&amp;gt;
      &amp;lt;action method=&quot;setToolbarBlockName&quot;&amp;gt;&amp;lt;name&amp;gt;product_list_toolbar&amp;lt;/name&amp;gt;&amp;lt;/action&amp;gt;
   &amp;lt;/block&amp;gt;
&amp;lt;/reference&amp;gt;&lt;/pre&gt;========================================&lt;br /&gt;
&lt;br /&gt;
There you have it... Don&#39;t forget to put a special price, special-from-date and special-to-date in your products...&lt;br /&gt;
Reference: &lt;a href=&#39;http://www.magentocommerce.com/boards/viewthread/16098/P15/&#39; target=&#39;_blank&#39;&gt;http://www.magentocommerce.com/boards/viewthread/16098/P15/&lt;/a&gt; :kkrieger&#39;s post&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/6118972403027776967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2011/02/magento-how-to-create-special-price.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6118972403027776967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6118972403027776967'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2011/02/magento-how-to-create-special-price.html' title='Magento - How to create a special price page? (with new products first)'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-3528619106590146369</id><published>2011-02-03T19:29:00.001-08:00</published><updated>2011-09-01T02:25:50.186-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="image switcher"/><category scheme="http://www.blogger.com/atom/ns#" term="media.phtml"/><category scheme="http://www.blogger.com/atom/ns#" term="prototype"/><title type='text'>Magento product image switcher</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;Recently had a client who wants to display the more views thumbnail in the main picture when clicked. Then when the main picture is clicked, the main picture will be displayed via lightbox.&lt;br /&gt;
For the Image switcher: (replace the catalog/product/view/media.phtml content with these)&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_product = $this-&amp;gt;getProduct();
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_helper = $this-&amp;gt;helper(&#39;catalog/output&#39;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_gallery = $this-&amp;gt;getGalleryImages();
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_resize = 265;
?&amp;gt;
&lt;/pre&gt;&lt;pre class=&quot;brush: css&quot;&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;
.product-img-box .more-views li.slide-current a{ border:2px solid #aaa; }
.product-img-box .product-image-zoom img { cursor: pointer; }
#slide-loader{ visibility:hidden; position:absolute; top:auto; left:auto; right:2px; bottom:2px; width: 25px; height: 25px; }
&amp;lt;/style&amp;gt;
&lt;/pre&gt;&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
function slide(url,num,gallery){
  if (typeof slide.loading == &#39;undefined&#39;) slide.loading = false;
    if(slide.loading) return false;
      var loader = new Image();
      $(loader).observe(&#39;load&#39;, function(){
         $(&#39;slide-loader&#39;).setStyle({&#39;visibility&#39;:&#39;hidden&#39;});
         $(&#39;div.more-views li&#39;).each(function(el,i){
           (i==num) ? el.addClassName(&#39;slide-current&#39;) : el.removeClassName(&#39;slide-current&#39;);
         });
         var dummy = new Element(&#39;img&#39;, { src: url }).setOpacity(0);
         new Insertion.After(&#39;image&#39;, dummy);
         new Effect.Opacity(dummy, { duration:.5, from:0, to:1.0 });
         new Effect.Opacity($(&#39;image&#39;), { duration:.5, from:1.0, to:0, 
         afterFinish: function(){
        $(&#39;image&#39;).writeAttribute(&#39;src&#39;,url).setOpacity(1).observe(&#39;click&#39;,function(e){
  Event.stop(e);
  popWin(gallery, &#39;gallery&#39;, &#39;width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes&#39;); 
  return false;
;})
dummy.remove();
slide.loading = false;
}
});
});
$(&#39;slide-loader&#39;).setStyle({&#39;visibility&#39;:&#39;visible&#39;});
loader.src=url;
slide.loading = true;
return false;
}
&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;p class=&quot;product-image-zoom&quot;&amp;gt;
&amp;lt;?php
$_img = &#39;&amp;lt;img id=&quot;image&quot; src=&quot;&#39;.$this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($_product, &#39;image&#39;)-&amp;gt;resize($_resize).&#39;&quot; alt=&quot;&#39;.$this-&amp;gt;htmlEscape($this-&amp;gt;getImageLabel()).&#39;&quot; title=&quot;&#39;.$this-&amp;gt;htmlEscape($this-&amp;gt;getImageLabel()).&#39;&quot; onclick=&quot;popWin(\&#39;&#39;.$this-&amp;gt;getGalleryUrl().&#39;.\&#39;, \&#39;gallery\&#39;, \&#39;width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes\&#39;); return false;&quot; /&amp;gt;&#39;;
echo $_helper-&amp;gt;productAttribute($_product, $_img, &#39;image&#39;)
?&amp;gt;
&amp;lt;img id=&quot;slide-loader&quot; src=&quot;&amp;lt;?php echo $this-&amp;gt;getSkinUrl(&#39;images/opc-ajax-loader.gif&#39;) ?&amp;gt;&quot; /&amp;gt;
&amp;lt;/p&amp;gt;
&amp;lt;p class=&quot;a-center&quot; id=&quot;track_hint&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Click on above image to view full picture&#39;) ?&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;?php if (count($_gallery) &amp;gt; 0): ?&amp;gt;
&amp;lt;div class=&quot;more-views&quot;&amp;gt;
&amp;lt;h4&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;More Views&#39;) ?&amp;gt;&amp;lt;/h4&amp;gt;
&amp;lt;ul&amp;gt;
&amp;lt;?php foreach ($_gallery as $_image): ?&amp;gt;
&amp;lt;li&amp;gt;
&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($this-&amp;gt;getProduct(), &#39;image&#39;, $_image-&amp;gt;getFile()); ?&amp;gt;&quot; onclick=&quot;slide(&#39;&amp;lt;?php echo $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($this-&amp;gt;getProduct(), &#39;image&#39;, $_image-&amp;gt;getFile())-&amp;gt;resize($_resize) ?&amp;gt;&#39;,&amp;lt;?php echo ($s = isset($s) ? ++$s : 0) ?&amp;gt;,&#39;&amp;lt;?php echo $this-&amp;gt;getGalleryUrl($_image) ?&amp;gt;&#39;); return false;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($this-&amp;gt;getProduct(), &#39;thumbnail&#39;, $_image-&amp;gt;getFile())-&amp;gt;resize(56); ?&amp;gt;&quot; alt=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_image-&amp;gt;getLabel()) ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_image-&amp;gt;getLabel()) ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;/li&amp;gt;
&amp;lt;?php endforeach; ?&amp;gt;
&amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;?php endif; ?&amp;gt;&lt;/pre&gt;One thing to note though. When the main picture is clicked, it will load the image in a popup window which is not beautiful.. I want to add a lightbox effects that will load the main picture when clicked.&lt;br /&gt;
================================================================&lt;br /&gt;
&lt;b&gt;Update: achieved the thickbox lightbox integration. Refer to this site : www.room9.nl &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Here&#39;s the same code from above but modified...&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php
$_product = $this-&amp;gt;getProduct();
$_helper = $this-&amp;gt;helper(&#39;catalog/output&#39;);
$_gallery = $this-&amp;gt;getGalleryImages();
$_resize = 350;
?&amp;gt;
&lt;/pre&gt;&lt;pre class=&quot;brush: css&quot;&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;
.product-img-box .more-views li.slide-current a{ border:2px solid #aaa; }
.product-img-box .product-image-zoom img { cursor: pointer; }
#slide-loader{ visibility:hidden; position:absolute; top:auto; left:auto; right:2px; bottom:2px; width: 25px; height: 25px; }
&amp;lt;/style&amp;gt;
&lt;/pre&gt;&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
function slide(url,num,gallery){
if (typeof slide.loading == &#39;undefined&#39;) slide.loading = false;
if(slide.loading) return false;
var loader = new Image();
$(loader).observe(&#39;load&#39;, function(){
$(&#39;slide-loader&#39;).setStyle({&#39;visibility&#39;:&#39;hidden&#39;});
$(&#39;div.more-views li&#39;).each(function(el,i){
(i==num) ? el.addClassName(&#39;slide-current&#39;) : el.removeClassName(&#39;slide-current&#39;);
});
var dummy = new Element(&#39;img&#39;, { src: url }).setOpacity(0);
new Insertion.After(&#39;image&#39;, dummy);
new Effect.Opacity(dummy, { duration:.5, from:0, to:1.0 });
new Effect.Opacity($(&#39;image&#39;), { duration:.5, from:1.0, to:0, 
afterFinish: function(){
$(&#39;image&#39;).writeAttribute(&#39;src&#39;,url).setOpacity(1).observe(&#39;click&#39;,function(){
$(&#39;swapper&#39;).href = url;
})
dummy.remove();
slide.loading = false;
}
});
});
$(&#39;slide-loader&#39;).setStyle({&#39;visibility&#39;:&#39;visible&#39;});
loader.src=url;
slide.loading = true;
return false;
}
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;p class=&quot;product-image-zoom&quot;&amp;gt;
&amp;lt;?php
$_img_a = &#39;&amp;lt;a id=&quot;swapper&quot; class=&quot;thickbox&quot; rel=&quot;group&quot; href=&quot;&#39;.$this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($_product, &#39;image&#39;).&#39;&quot; title=&quot;&#39;.$this-&amp;gt;htmlEscape($this-&amp;gt;getImageLabel()).&#39;&quot;&amp;gt;&#39;;
$_img_b = &#39;&amp;lt;img id=&quot;image&quot; src=&quot;&#39;.$this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($_product, &#39;image&#39;).&#39;&quot; alt=&quot;&#39;.$this-&amp;gt;htmlEscape($this-&amp;gt;getImageLabel()).&#39;&quot; title=&quot;&#39;.$this-&amp;gt;htmlEscape($this-&amp;gt;getImageLabel()).&#39;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&#39;;
?&amp;gt;
&amp;lt;?php echo $_helper-&amp;gt;productAttribute($_product, $_img_a.$_img_b, &#39;image&#39;) ?&amp;gt;
&amp;lt;img id=&quot;slide-loader&quot; src=&quot;&amp;lt;?php echo $this-&amp;gt;getSkinUrl(&#39;images/lightbox/loading.gif&#39;) ?&amp;gt;&quot; /&amp;gt;
&amp;nbsp; &amp;lt;/p&amp;gt;
&amp;lt;?php if (count($_gallery) &amp;gt; 0): ?&amp;gt;
&amp;lt;div class=&quot;more-views&quot;&amp;gt;
&amp;lt;h4&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;More Views&#39;) ?&amp;gt;&amp;lt;/h4&amp;gt;
&amp;lt;ul&amp;gt;
&amp;lt;?php foreach ($_gallery as $_image): ?&amp;gt;
&amp;lt;li&amp;gt;
&amp;lt;a rel=&quot;group&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($this-&amp;gt;getProduct(), &#39;image&#39;, $_image-&amp;gt;getFile()); ?&amp;gt;&quot; onclick=&quot;slide(&#39;&amp;lt;?php echo $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($this-&amp;gt;getProduct(), &#39;image&#39;, $_image-&amp;gt;getFile()) ?&amp;gt;&#39;,&amp;lt;?php echo ($s = isset($s) ? ++$s : 0) ?&amp;gt;,&#39;&amp;lt;?php echo $this-&amp;gt;getGalleryUrl($_image) ?&amp;gt;&#39;); return false;&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($this-&amp;gt;getProduct(), &#39;thumbnail&#39;, $_image-&amp;gt;getFile())-&amp;gt;resize(65); ?&amp;gt;&quot; alt=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_image-&amp;gt;getLabel()) ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_image-&amp;gt;getLabel()) ?&amp;gt;&quot; /&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;/li&amp;gt;
&amp;lt;?php endforeach; ?&amp;gt;
&amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Reference: &lt;a href=&quot;http://inchoo.net/ecommerce/magento/magento-product-images-switcher/&quot; target=&quot;_blank&quot;&gt;http://inchoo.net/ecommerce/magento/magento-product-images-switcher/&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/3528619106590146369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2011/02/magento-product-image-switcher.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/3528619106590146369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/3528619106590146369'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2011/02/magento-product-image-switcher.html' title='Magento product image switcher'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-4263320166455384201</id><published>2011-01-18T06:58:00.001-08:00</published><updated>2011-09-02T02:18:20.965-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geoip"/><category scheme="http://www.blogger.com/atom/ns#" term="store switcher"/><title type='text'>Magento - Auto Store switcher using GEOIP</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;Prerequisites:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;GEOIP (geoip.inc, geoip.dat etc)&lt;/li&gt;
&lt;li&gt;Signup for an account in &lt;a href=&#39;http://ipinfodb.com&#39; target=&#39;_blank&#39;&gt;www.ipinfodb.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download the php class api &lt;a href=&#39;http://mirrors.ipinfodb.com/ipinfodb/classes/geolocationapi_class.zip&#39; target=&#39;_blank&#39;&gt;HERE&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1. put the geoip files (preferably in a folder) in root directory&lt;/li&gt;
&lt;li&gt;2. edit the index.php of the root directory and replace these code&lt;/li&gt;
&lt;pre class=&quot;brush: php&quot;&gt;/* Store or website code */
$mageRunCode = isset($_SERVER[&#39;MAGE_RUN_CODE&#39;]) ? $_SERVER[&#39;MAGE_RUN_CODE&#39;] : &#39;&#39;;

/* Run store or run website */
$mageRunType = isset($_SERVER[&#39;MAGE_RUN_TYPE&#39;]) ? $_SERVER[&#39;MAGE_RUN_TYPE&#39;] : &#39;store&#39;;

Mage::run($mageRunCode, $mageRunType);
&lt;/pre&gt;&lt;li&gt;with these&lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;brush: php&quot;&gt;//########### GEOIP ############//
$geoipPath = &#39;geoip.inc&#39;;
include($geoipPath);

$gi = geoip_open(&quot;GeoIP/GeoIP.dat&quot;,GEOIP_STANDARD);

$ip = $_SERVER[&#39;REMOTE_ADDR&#39;];
$country_code = geoip_country_code_by_addr($gi, $ip);

if(strtoupper($country_code) != &quot;NL&quot;){
    $mageRunCode = isset($_SERVER[&#39;MAGE_RUN_CODE&#39;]) ? $_SERVER[&#39;MAGE_RUN_CODE&#39;] : &#39;en&#39;;
    $mageRunType = isset($_SERVER[&#39;MAGE_RUN_TYPE&#39;]) ? $_SERVER[&#39;MAGE_RUN_TYPE&#39;] : &#39;store&#39;;

    Mage::run($mageRunCode, $mageRunType);
}else{
    $mageRunCode = isset($_SERVER[&#39;MAGE_RUN_CODE&#39;]) ? $_SERVER[&#39;MAGE_RUN_CODE&#39;] : &#39;nl&#39;;
    $mageRunType = isset($_SERVER[&#39;MAGE_RUN_TYPE&#39;]) ? $_SERVER[&#39;MAGE_RUN_TYPE&#39;] : &#39;store&#39;;

    Mage::run($mageRunCode, $mageRunType);
}
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/4263320166455384201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2011/01/magento-auto-store-switcher-using-geoip.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/4263320166455384201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/4263320166455384201'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2011/01/magento-auto-store-switcher-using-geoip.html' title='Magento - Auto Store switcher using GEOIP'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-1026100134036446790</id><published>2010-12-02T22:41:00.001-08:00</published><updated>2011-09-02T02:27:30.282-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="custom pagination"/><category scheme="http://www.blogger.com/atom/ns#" term="magento pagination"/><title type='text'>Magento - Custom Pagination</title><content type='html'>&lt;img alt=&quot;custom pagination&quot; border=&quot;0&quot; height=&quot;24&quot; src=&quot;http://lh6.ggpht.com/_qU_PHLLcrCk/TPYl4V025hI/AAAAAAAAACU/FHvFFNS5E7U/%5BUNSET%5D.jpg&quot; style=&quot;float: left; margin: 0pt 10px 10px 0pt;&quot; width=&quot;550&quot; /&gt;&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;br /&gt;
Ok so you want to have a different pagination.. that can be arranged.. :)&lt;br /&gt;
&lt;br /&gt;
3 Files to edit:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;styles.css&lt;/li&gt;
&lt;li&gt;template/catalog/product/list/toolbar.phtml&lt;/li&gt;
&lt;li&gt;template/page/html/pager.phtml&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;toolbar.phtml&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php if($this-&amp;gt;getCollection()-&amp;gt;getSize()): ?&amp;gt;
&amp;lt;div class=&quot;toolbar&quot;&amp;gt;
&amp;lt;div class=&quot;pager&quot;&amp;gt;

&amp;lt;div class=&quot;limiter&quot;&amp;gt;
&amp;lt;label&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Toon:&#39;) ?&amp;gt;&amp;lt;/label&amp;gt;
&amp;lt;?php foreach ($this-&amp;gt;getAvailableLimit() as  $_key=&amp;gt;$_limit): ?&amp;gt;
&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getLimitUrl($_key) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $_limit ?&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;?php endforeach; ?&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;?php echo $this-&amp;gt;getPagerHtml() ?&amp;gt;

&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;pager.phtml&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php if($this-&amp;gt;getCollection()-&amp;gt;getSize()): ?&amp;gt;

&amp;lt;?php if($this-&amp;gt;getUseContainer()): ?&amp;gt;
&amp;lt;div class=&quot;pager&quot;&amp;gt;
&amp;lt;?php endif ?&amp;gt;

&amp;lt;?php if($this-&amp;gt;getShowAmounts()): ?&amp;gt;
&amp;lt;p class=&quot;amount&quot;&amp;gt;
&amp;lt;?php if($this-&amp;gt;getLastPageNum()&amp;gt;1): ?&amp;gt;
&amp;lt;?php echo $this-&amp;gt;__(&#39;Items %s to %s of %s total&#39;, $this-&amp;gt;getFirstNum(), $this-&amp;gt;getLastNum(), $this-&amp;gt;getTotalNum()) ?&amp;gt;
&amp;lt;?php else: ?&amp;gt;
&amp;lt;strong&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;%s Item(s)&#39;, $this-&amp;gt;getTotalNum()) ?&amp;gt;&amp;lt;/strong&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
&amp;lt;/p&amp;gt;
&amp;lt;?php endif ?&amp;gt;

&amp;lt;?php if($this-&amp;gt;getShowPerPage()): ?&amp;gt;
&amp;lt;div class=&quot;limiter&quot;&amp;gt;
&amp;lt;label&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Show&#39;) ?&amp;gt;&amp;lt;/label&amp;gt;
&amp;lt;select onchange=&quot;setLocation(this.value)&quot;&amp;gt;
&amp;lt;?php foreach ($this-&amp;gt;getAvailableLimit() as  $_key=&amp;gt;$_limit): ?&amp;gt;
&amp;lt;option value=&quot;&amp;lt;?php echo $this-&amp;gt;getLimitUrl($_key) ?&amp;gt;&quot;&amp;lt;?php if($this-&amp;gt;isLimitCurrent($_key)): ?&amp;gt; selected=&quot;selected&quot;&amp;lt;?php endif ?&amp;gt;&amp;gt;
&amp;lt;?php echo $_limit ?&amp;gt;
&amp;lt;/option&amp;gt;
&amp;lt;?php endforeach; ?&amp;gt;
&amp;lt;/select&amp;gt; &amp;lt;?php echo $this-&amp;gt;__(&#39;per page&#39;) ?&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;?php endif ?&amp;gt;

&amp;lt;!-- ############################ PAGER TOOLBAR ############################# --&amp;gt;

&amp;lt;?php if($this-&amp;gt;getLastPageNum()&amp;gt;1): ?&amp;gt;
&amp;lt;div class=&quot;pages&quot;&amp;gt;
&amp;lt;ol&amp;gt;

&amp;lt;!-- ##################### PREVIOUS TOOLBAR ####################### --&amp;gt;
&amp;lt;div class=&quot;previous&quot;&amp;gt;
&amp;lt;?php if (!$this-&amp;gt;isFirstPage()): ?&amp;gt;
&amp;lt;a class=&quot;previous-link&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getPreviousPageUrl() ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $this-&amp;gt;__(&#39;Previous&#39;) ?&amp;gt;&quot;&amp;gt;
&amp;lt;?php if(!$this-&amp;gt;getAnchorTextForPrevious()): ?&amp;gt;
&amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;getSkinUrl(&#39;images/i_pager-prev.gif&#39;) ?&amp;gt;&quot; alt=&quot;&amp;lt;?php echo $this-&amp;gt;__(&#39;Previous&#39;) ?&amp;gt;&quot; class=&quot;v-middle&quot; /&amp;gt;
&amp;lt;?php else: ?&amp;gt;
&amp;lt;?php echo $this-&amp;gt;getAnchorTextForPrevious() ?&amp;gt;
&amp;lt;?php endif;?&amp;gt;
&amp;lt;/a&amp;gt;
&amp;lt;?php else: ?&amp;gt;
&amp;lt;span class=&quot;no-previous&quot;&amp;gt;

&amp;lt;?php echo $this-&amp;gt;getAnchorTextForPrevious() ?&amp;gt;
&amp;lt;/span&amp;gt;
&amp;lt;?php endif;?&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;?php if ($this-&amp;gt;canShowFirst()): ?&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a class=&quot;first&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getFirstPageUrl() ?&amp;gt;&quot;&amp;gt;1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;?php endif;?&amp;gt;

&amp;lt;?php if ($this-&amp;gt;getCurrentPage() &amp;gt;= 4): ?&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a class=&quot;first&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getFirstPageUrl() ?&amp;gt;&quot;&amp;gt;1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li class=&quot;ellipse&quot;&amp;gt; ... &amp;lt;/li&amp;gt;
&amp;lt;?php endif; ?&amp;gt;

&amp;lt;?php if ($this-&amp;gt;canShowPreviousJump()): ?&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a class=&quot;previous_jump&quot; title=&quot;&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getPreviousJumpUrl() ?&amp;gt;&quot;&amp;gt;...&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;?php endif;?&amp;gt;

&amp;lt;?php foreach ($this-&amp;gt;getFramePages() as $_page): ?&amp;gt;
&amp;lt;?php if ($this-&amp;gt;isPageCurrent($_page)): ?&amp;gt;
&amp;lt;li class=&quot;current&quot;&amp;gt;&amp;lt;?php echo $_page ?&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;?php else: ?&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getPageUrl($_page) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $_page ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;?php endif;?&amp;gt;
&amp;lt;?php endforeach;?&amp;gt;


&amp;lt;?php if ($this-&amp;gt;canShowNextJump()): ?&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a class=&quot;next_jump&quot; title=&quot;&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getNextJumpUrl() ?&amp;gt;&quot;&amp;gt;...&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;?php endif;?&amp;gt;

&amp;lt;?php
$lastpage = $this-&amp;gt;getLastPageNum();
$lastpage = $lastpage - 2;
?&amp;gt;

&amp;lt;?php if ($this-&amp;gt;getCurrentPage() &amp;lt; $lastpage ): ?&amp;gt;
&amp;lt;li class=&quot;ellipse&quot;&amp;gt; ... &amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a class=&quot;last&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getLastPageUrl() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;getLastPageNum() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;?php endif; ?&amp;gt;

&amp;lt;?php if ($this-&amp;gt;canShowLast()): ?&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a class=&quot;last&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getLastPageUrl() ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;getLastPageNum() ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;li&amp;gt;
&amp;lt;?php endif;?&amp;gt;

&amp;lt;!-- ##################### NEXT TOOLBAR ####################### --&amp;gt;
&amp;lt;div class=&quot;next&quot;&amp;gt;
&amp;lt;?php if (!$this-&amp;gt;isLastPage()): ?&amp;gt;
&amp;lt;a class=&quot;next-link&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getNextPageUrl() ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $this-&amp;gt;__(&#39;Next &amp;gt;&#39;) ?&amp;gt;&quot;&amp;gt;
&amp;lt;?php if(!$this-&amp;gt;getAnchorTextForNext()): ?&amp;gt;
&amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;getSkinUrl(&#39;images/i_pager-next.gif&#39;) ?&amp;gt;&quot; alt=&quot;&amp;lt;?php echo $this-&amp;gt;__(&#39;Next&#39;) ?&amp;gt;&quot; class=&quot;v-middle&quot; /&amp;gt;
&amp;lt;?php else: ?&amp;gt;
&amp;lt;?php echo $this-&amp;gt;getAnchorTextForNext() ?&amp;gt;

&amp;lt;?php endif;?&amp;gt;
&amp;lt;/a&amp;gt;
&amp;lt;?php else: ?&amp;gt;
&amp;lt;span class=&quot;no-next&quot;&amp;gt;
&amp;lt;?php echo $this-&amp;gt;getAnchorTextForNext() ?&amp;gt;
&amp;lt;/span&amp;gt;
&amp;lt;?php endif;?&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/ol&amp;gt;

&amp;lt;/div&amp;gt;

&amp;lt;?php endif; ?&amp;gt;
&amp;lt;?php if($this-&amp;gt;getUseContainer()): ?&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;?php endif ?&amp;gt;
&amp;lt;?php endif ?&amp;gt;
&lt;/pre&gt;Style it with CSS and you can have a new pagination.. Godbless!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/1026100134036446790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/12/magento-custom-pagination.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1026100134036446790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1026100134036446790'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/12/magento-custom-pagination.html' title='Magento - Custom Pagination'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_qU_PHLLcrCk/TPYl4V025hI/AAAAAAAAACU/FHvFFNS5E7U/s72-c/%5BUNSET%5D.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-6017199099635645839</id><published>2010-12-01T02:35:00.001-08:00</published><updated>2011-09-02T02:31:14.915-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="customize layered navigation"/><category scheme="http://www.blogger.com/atom/ns#" term="layered navigation"/><title type='text'>Magento - Layered Navigation Custom</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;img src=&quot;http://lh4.ggpht.com/_qU_PHLLcrCk/TPYi5RpIKKI/AAAAAAAAACQ/C3r9Q_brjUs/%5BUNSET%5D.jpg?imgmax=800&quot; style=&quot;width: 550px; height: 37px;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
If you want your layered navigation to be customized like the image above follow me... :)&lt;br /&gt;
&lt;br /&gt;
We need to edit 3 files..&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;styles.css&lt;/li&gt;
&lt;li&gt;template/catalog/layer/filter.phtml&lt;/li&gt;
&lt;li&gt;template/catalog/layer/view.phtml&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;filter.phtml&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;select onchange=&quot;setLocation(this.value)&quot; class=&quot;layer-nav-homepage&quot;&amp;gt;
&amp;lt;option value=&quot;&quot; selected=&quot;true&quot;&amp;gt;

&amp;lt;?php if($GLOBALS[&#39;filtername&#39;] == &quot;Category&quot;): ?&amp;gt;
&amp;lt;span&amp;gt;Kunstenaars&amp;lt;/span&amp;gt;
&amp;lt;?php else: ?&amp;gt;
&amp;lt;?php echo $GLOBALS[&#39;filtername&#39;]; ?&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
&amp;lt;/option&amp;gt;

&amp;lt;?php foreach ($this-&amp;gt;getItems() as $_item): ?&amp;gt;
&amp;lt;?php if ($_item-&amp;gt;getCount() &amp;gt; 0): ?&amp;gt;
&amp;lt;option value=&quot;&amp;lt;?php echo $this-&amp;gt;urlEscape($_item-&amp;gt;getUrl()) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $_item-&amp;gt;getLabel() ?&amp;gt;&amp;amp;nbsp;(&amp;lt;?php echo $_item-&amp;gt;getCount() ?&amp;gt;)&amp;lt;/option&amp;gt;
&amp;lt;!--&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;urlEscape($_item-&amp;gt;getUrl()) ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $_item-&amp;gt;getLabel() ?&amp;gt;&amp;lt;/a&amp;gt;--&amp;gt;
&amp;lt;?php else: echo $_item-&amp;gt;getLabel() ?&amp;gt;
&amp;lt;?php endif; ?&amp;gt;


&amp;lt;?php endforeach ?&amp;gt;
&amp;lt;/select&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Remarks:&lt;/b&gt; &lt;br /&gt;
&lt;i&gt;The list was changed into &amp;lt;select&amp;gt; for dropdown, then a default (no value) option was placed - this will get the name of the filter.. eg. category, price and style..., then the option..&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;view.phtml&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php if($this-&amp;gt;canShowBlock()): ?&amp;gt;
&amp;lt;div class=&quot;block block-layered-nav&quot;&amp;gt;
&amp;lt;div class=&quot;block-title&quot;&amp;gt;
&amp;lt;span&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Filter kunst op: &#39;) ?&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class=&quot;block-content&quot;&amp;gt;
&amp;lt;?php echo $this-&amp;gt;getStateHtml() ?&amp;gt;
&amp;lt;?php if($this-&amp;gt;canShowOptions()): ?&amp;gt;
&amp;lt;!--&amp;lt;p class=&quot;block-subtitle&quot;&amp;gt;&amp;lt;?php // echo $this-&amp;gt;__(&#39;Shopping Options&#39;) ?&amp;gt;&amp;lt;/p&amp;gt;--&amp;gt;
&amp;lt;dl id=&quot;narrow-by-list&quot;&amp;gt;

&amp;lt;?php $_filters = $this-&amp;gt;getFilters() ?&amp;gt;
&amp;lt;?php $i=0; ?&amp;gt;
&amp;lt;?php foreach ($_filters as $_filter): ?&amp;gt;
&amp;lt;?php if($_filter-&amp;gt;getItemsCount()): ?&amp;gt;

&amp;lt;?php $GLOBALS[&#39;filtername&#39;] = $_filter-&amp;gt;getName(); ?&amp;gt;

&amp;lt;!--&amp;lt;dt&amp;gt;&amp;lt;?php // echo $this-&amp;gt;__($_filter-&amp;gt;getName()) ?&amp;gt;&amp;lt;/dt&amp;gt;--&amp;gt;
&amp;lt;dd&amp;gt;&amp;lt;?php echo $_filter-&amp;gt;getHtml() ?&amp;gt;&amp;lt;/dd&amp;gt;

&amp;lt;?php if($i==2): ?&amp;gt;
&amp;lt;?php else: ?&amp;gt;
&amp;lt;span&amp;gt; of &amp;lt;/span&amp;gt;
&amp;lt;?php endif; $i++; ?&amp;gt;

&amp;lt;?php endif; ?&amp;gt;
&amp;lt;?php endforeach; ?&amp;gt;

&amp;lt;/dl&amp;gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;decorateDataList(&#39;narrow-by-list&#39;)&amp;lt;/script&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Remarks:&lt;/b&gt; &lt;br /&gt;
&lt;i&gt;The global var is for the filter name to be passed on the filter.phtml, then the condition if == 2 is for the OF... :)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Then to be able to put this on the homepage, you should enable isAnchor property of Default category... Also make the style attribute... That&#39;s IT! Hope this helps! Godbless!&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/6017199099635645839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/12/magento-layered-navigation-custom.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6017199099635645839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6017199099635645839'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/12/magento-layered-navigation-custom.html' title='Magento - Layered Navigation Custom'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_qU_PHLLcrCk/TPYi5RpIKKI/AAAAAAAAACQ/C3r9Q_brjUs/s72-c/%5BUNSET%5D.jpg?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-4657225092316483490</id><published>2010-12-01T02:21:00.001-08:00</published><updated>2011-09-02T02:38:12.973-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="display all products in homepage with pagination"/><title type='text'>Magento - Display all products in Homepage with pagination</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;br /&gt;
&lt;p&gt;A client asked to create a Magento shop with Art Gallery like functionality. What she want is to have a product list in the homepage having pagination. Let&#39;s get it on!&lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;In the backend: &lt;br /&gt;
Manage Categories &amp;gt; set the default category to anchor:yes, then assign all products in this category &lt;/li&gt;
&lt;li&gt;CMS-&amp;gt;homepage &amp;gt; put this snippet in the layout update xml &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;!-- ########################## DISPLAY ALL PRODUCTS IN HOMEPAGE ############################ --&amp;gt;
&amp;lt;reference name=&quot;content&quot;&amp;gt;
&amp;lt;block type=&quot;catalog/layer_view&quot; name=&quot;catalog.leftnav&quot; before=&quot;-&quot; template=&quot;catalog/layer/view.phtml&quot;/&amp;gt;
&amp;lt;block type=&quot;catalog/product_list&quot; name=&quot;product_list&quot; template=&quot;catalog/product/list.phtml&quot;&amp;gt;
&amp;lt;block type=&quot;catalog/product_list_toolbar&quot; name=&quot;product_list_toolbar&quot; template=&quot;catalog/product/list/toolbar.phtml&quot;&amp;gt;
&amp;lt;block type=&quot;page/html_pager&quot; name=&quot;product_list_toolbar_pager&quot;/&amp;gt;
&amp;lt;/block&amp;gt;
&amp;lt;action method=&quot;addColumnCountLayoutDepend&quot;&amp;gt;&amp;lt;layout&amp;gt;two_columns_right&amp;lt;/layout&amp;gt;&amp;lt;count&amp;gt;4&amp;lt;/count&amp;gt;&amp;lt;/action&amp;gt;
&amp;lt;action method=&quot;setToolbarBlockName&quot;&amp;gt;&amp;lt;name&amp;gt;product_list_toolbar&amp;lt;/name&amp;gt;&amp;lt;/action&amp;gt;
&amp;lt;/block&amp;gt;
&amp;lt;update handle=&quot;page_two_columns_right&quot; /&amp;gt;
&amp;lt;/reference&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/4657225092316483490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/12/magento-display-all-products-in.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/4657225092316483490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/4657225092316483490'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/12/magento-display-all-products-in.html' title='Magento - Display all products in Homepage with pagination'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-5831527003259698440</id><published>2010-11-23T19:06:00.001-08:00</published><updated>2011-09-02T02:47:20.548-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="display category in homepage"/><category scheme="http://www.blogger.com/atom/ns#" term="magento category"/><title type='text'>Magento - Display Categories (with category images) in the homepage</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;div class=&quot;top-home-category&quot;&amp;gt;
&amp;lt;?php 
/******** Don&#39;t know why I commented this
$_helper = $this-&amp;gt;helper(&#39;catalog/output&#39;);
$_category = $this-&amp;gt;getCurrentCategory();
$_imgHtml = &#39;&#39;;

if ($_imgUrl = $_category-&amp;gt;getImageUrl()) {
$_imgHtml = &#39;&amp;lt;p class=&quot;category-image&quot;&amp;gt;&amp;lt;img src=&quot;&#39;.$_imgUrl.&#39;&quot; alt=&quot;&#39;.$this-&amp;gt;htmlEscape($_category-&amp;gt;getName()).&#39;&quot; title=&quot;&#39;.$this-&amp;gt;htmlEscape($_category-&amp;gt;getName()).&#39;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&#39;;
$_imgHtml = $_helper-&amp;gt;categoryAttribute($_category, $_imgHtml, &#39;image&#39;);
}
****************************************/
?&amp;gt;

&amp;lt;?php // Iterate all categories in store
 $limit = 0;
$_helper&amp;nbsp;&amp;nbsp;&amp;nbsp; = $this-&amp;gt;helper(&#39;catalog/output&#39;);
foreach ($this-&amp;gt;getStoreCategories() as $_category): 
// If category is Active
if($_category-&amp;gt;getIsActive()):
// Load the actual category object for this category
$cur_category = Mage::getModel(&#39;catalog/category&#39;)-&amp;gt;load($_category-&amp;gt;getId());
if ($_imgUrl = $cur_category-&amp;gt;getImageUrl()){
$_imgHtml = &#39;&amp;lt;img src=&quot;&#39;.$_imgUrl.&#39;&quot; alt=&quot;&#39;.$this-&amp;gt;htmlEscape($cur_category-&amp;gt;getName()).&#39;&quot; title=&quot;&#39;.$this-&amp;gt;htmlEscape($cur_category-&amp;gt;getName()).&#39;&quot;&amp;nbsp; width=&quot;105px&quot; /&amp;gt;&#39;;
$_imgHtml = $_helper-&amp;gt;categoryAttribute($cur_category, $_imgHtml, &#39;image&#39;);
} 
?&amp;gt;
&amp;lt;div class=&quot;home-category&quot;&amp;gt;
&amp;lt;div class=&quot;linkimage&quot;&amp;gt;
&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getCategoryUrl($cur_category) ?&amp;gt;&quot; style=&quot;border:none&quot;&amp;gt;
&amp;lt;?php echo $_imgHtml; ?&amp;gt;
&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class=&quot;category-link-container&quot;&amp;gt;
&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getCategoryUrl($cur_category) ?&amp;gt;&quot;&amp;gt;
&amp;lt;?php echo $_helper-&amp;gt;categoryAttribute($cur_category, $cur_category-&amp;gt;getName(), &#39;name&#39;) ?&amp;gt;
&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;

// Load a random product from this category
/*$products = Mage::getResourceModel(&#39;catalog/product_collection&#39;)-&amp;gt;addCategoryFilter($cur_category)-&amp;gt;addAttributeToSelect(&#39;small_image&#39;);
$products-&amp;gt;getSelect()-&amp;gt;order(new Zend_Db_Expr(&#39;RAND()&#39;))-&amp;gt;limit(1);
$products-&amp;gt;load();
// This a bit of a fudge - there&#39;s only one element in the collection
$_product = null;
foreach ( $products as $_product ) {}
?&amp;gt;
&amp;lt;div class=&quot;home-category&quot;&amp;gt;
&amp;lt;div class=&quot;linkimage&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getCategoryUrl($_category)?&amp;gt;&quot;&amp;gt;
&amp;lt;?php
if(isset($_product)):
&amp;lt;img src=&quot;&amp;lt;?php echo $this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($_product, &#39;small_image&#39;)-&amp;gt;resize(135, 135); ?&amp;gt;&quot; width=&quot;135&quot; height=&quot;135&quot; alt=&quot;&amp;lt;?php echo $this-&amp;gt;htmlEscape($_product-&amp;gt;getName()) ?&amp;gt;&quot; /&amp;gt;
&amp;lt;?php
endif;
?&amp;gt; &amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getCategoryUrl($_category)?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $_category-&amp;gt;getName()?&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
*/?&amp;gt; &amp;lt;?php
$limit+=1;
endif;
if ($limit==8):
break;
endif;
endforeach;
?&amp;gt; 
&amp;lt;/div&amp;gt;
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/5831527003259698440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/11/magento-display-categories-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/5831527003259698440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/5831527003259698440'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/11/magento-display-categories-with.html' title='Magento - Display Categories (with category images) in the homepage'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-1071063185939230016</id><published>2010-11-22T23:33:00.001-08:00</published><updated>2011-09-02T03:53:12.906-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="custom breadcrumbs"/><title type='text'>Magento - Adding breadcrumbs to Homepage</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;br /&gt;
1. Register the new module (&lt;i&gt;we will call the module CMS and give the development company the name Acme&lt;/i&gt;): &lt;br /&gt;
&lt;br /&gt;
In your magento\app\etc\modules directory create a file named Acme_All.xml with the following content:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;
&amp;lt;config&amp;gt;
  &amp;lt;modules&amp;gt;
    &amp;lt;Acme_Cms&amp;gt;
      &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;
      &amp;lt;codePool&amp;gt;local&amp;lt;/codePool&amp;gt;
    &amp;lt;/Acme_Cms&amp;gt;
  &amp;lt;/modules&amp;gt;
&amp;lt;/config&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
2.&amp;nbsp;   Register the module (which will be implemented in the class &lt;br /&gt;
Acme_Cms_Block_Page) as being responsible for rewrite-ing the cms/page &lt;br /&gt;
block&lt;br /&gt;
&lt;br /&gt;
In a magento\app\code\local\Acme\Cms\etc directory (you will need to &lt;br /&gt;
create it) create a config.xml file with the following content:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?xml&amp;nbsp;version=&quot;1.0&quot;?&amp;gt;
&amp;lt;config&amp;gt;
  &amp;lt;global&amp;gt;
    &amp;lt;blocks&amp;gt;
      &amp;lt;cms&amp;gt;
        &amp;lt;rewrite&amp;gt;
          &amp;lt;page&amp;gt;Acme_Cms_Block_Page&amp;lt;/page&amp;gt;
        &amp;lt;/rewrite&amp;gt;
      &amp;lt;/cms&amp;gt;
    &amp;lt;/blocks&amp;gt;
  &amp;lt;/global&amp;gt;
&amp;lt;/config&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
3. Change the original block logic (&lt;i&gt;based on what is in app\code\core\Mage\Cms\Block\Page.php&lt;/i&gt;) to handle our CMS home page.&lt;br /&gt;
&lt;br /&gt;
In a magento\app\code\local\Acme\Cms\Block directory create a file named Page.php with the content:-&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php class Acme_Cms_Block_Page extends Mage_Cms_Block_Page{
protected function _prepareLayout(){
  $page=$this-&amp;gt;getPage();
  //show breadcrumbs
  if(Mage::getStoreConfig(&#39;web/default/show_cms_breadcrumbs&#39;) &amp;amp;&amp;amp; ($breadcrumbs=$this-&amp;gt;getLayout()-&amp;gt;getBlock(&#39;breadcrumbs&#39;))
&amp;amp;&amp;amp; ($page-&amp;gt;getIdentifier()!==Mage::getStoreConfig(&#39;web/default/cms_no_route&#39;))){
  $breadcrumbs-&amp;gt;addCrumb(&#39;home&#39;,array(&#39;label&#39;=&amp;gt;Mage::helper(&#39;cms&#39;)-&amp;gt;__(&#39;Home&#39;),&#39;title&#39;=&amp;gt;Mage::helper(&#39;cms&#39;)-&amp;gt;__(&#39;Go to Home Page&#39;),&#39;link&#39;=&amp;gt;Mage::getBaseUrl()));
  if ($page-&amp;gt;getIdentifier()!==Mage::getStoreConfig(&#39;web/default/cms_home_page&#39;)){
    $breadcrumbs-&amp;gt;addCrumb(&#39;cms_page&#39;, array(&#39;label&#39;=&amp;gt;$page-&amp;gt;getTitle(), &#39;title&#39;=&amp;gt;$page-&amp;gt;getTitle()));
  }
}
  if($root=$this-&amp;gt;getLayout()-&amp;gtgetBlock(&#39;root&#39;)){
    $root-&amp;gt;addBodyClass(&#39;cms-&#39;.$page-&amp;gt;getIdentifier());
  }
  if($head=$this-&amp;gt;getLayout()-&amp;gt;getBlock(&#39;head&#39;)){
    $head-&amp;gt;setTitle($page-&amp;gt;getTitle());
    $head-&amp;gt;setKeywords($page-&amp;gt;getMetaKeywords());
    $head-&amp;gt;setDescription($page-&amp;gt;getMetaDescription());
  }
}
}
&lt;/pre&gt;Be sure that you have enabled breadcrumbs for CMS pages &lt;br /&gt;
[Config-&amp;gt;Web-&amp;gt;Default Pages-&amp;gt;Show breadcrumbs for CMS pages = &lt;br /&gt;
Yes] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reference: &lt;a href=&quot;http://www.magentocommerce.com/boards/viewthread/49743/&quot; target=&quot;_blank&quot;&gt;http://www.magentocommerce.com/boards/viewthread/49743/&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/1071063185939230016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/11/magento-adding-breadcrumbs-to-homepage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1071063185939230016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1071063185939230016'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/11/magento-adding-breadcrumbs-to-homepage.html' title='Magento - Adding breadcrumbs to Homepage'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-5653202622347781019</id><published>2010-11-18T00:27:00.001-08:00</published><updated>2011-02-23T18:43:14.456-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Image rotator"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>Magento - Embed Jquery Image Rotator</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;A client wants to have a javascript Image Rotator in her site that will dynamically fetch and display all the images inside the specified folder ( so that she can add and remove them any time she wants).. So I opted to use Jquery Framework to do the job...&lt;br /&gt;
&lt;br /&gt;
here&#39;s the code I placed in catalog/navigation/getImage.phtml&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php echo $this-&amp;gt;getBaseUrl().&#39;jshowoff.css&#39; ?&amp;gt;&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo $this-&amp;gt;getBaseUrl().&#39;jquery.jshowoff.min.js&#39; ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/* This code will dynamically fetch all the images inside the specified folder&lt;br /&gt;
&amp;nbsp;* and display it using jquery&lt;br /&gt;
&amp;nbsp;* youngstownph@gmail.com&lt;br /&gt;
&amp;nbsp;* Incramind 2010&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $currentCategory = &#39;&#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $currentCategory = Mage::registry(&#39;current_category&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!empty($currentCategory))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $currentCategory = Mage::registry(&#39;current_category&#39;)-&amp;gt;getName();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
switch ($currentCategory)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; case &quot;Sjaals&quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $imagePath = &quot;media/banner/Sjaals&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; case &quot;Riemen&quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $imagePath = &quot;media/banner/Riemen&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $imagePath = &quot;media/banner/default&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ($dir = opendir($imagePath))&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $images = array();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while (($file = readdir($dir))!== false)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if ($file != &quot;.&quot; &amp;amp;&amp;amp; $file != &quot;..&quot; &amp;amp;&amp;amp; $file != &quot;Thumbs.db&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $images[] = $file;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; closedir($dir);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
echo &#39;&amp;lt;div id=&quot;slidingFeatures&quot;&amp;gt;&#39;;&lt;br /&gt;
foreach($images as $image) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &#39;&amp;lt;div&amp;gt;&amp;lt;img src=&quot;&#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $this-&amp;gt;getBaseUrl().$imagePath.&quot;/&quot;.$image;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &#39;&quot; alt=&quot;&#39;.$image.&#39;&quot; /&amp;gt;&amp;lt;/div&amp;gt;&#39;;&lt;br /&gt;
}&lt;br /&gt;
echo &#39;&amp;lt;/div&amp;gt;&#39;;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).ready(function(){ $(&#39;#slidingFeatures&#39;).jshowoff({&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; effect: &#39;slideLeft&#39;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; controlText:{play:&#39;Play&#39;,pause:&#39;Pause&#39;,previous:&#39;&amp;lt;&#39;,next:&#39;&amp;gt;&#39;},&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hoverPause: false&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;
If you want to display the rotator in the homepage...&lt;br /&gt;
&lt;blockquote&gt;{{block type=&quot;catalog/navigation&quot; name=&quot;homepage.slider&quot; template=&quot;catalog/navigation/getImage.phtml&quot;}}&lt;/blockquote&gt;&lt;br /&gt;
Add this code in the catalog.xml if you want the rotator to appear in the catalog page..&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;block type=&quot;catalog/category_view&quot; name=&quot;catalog.slider1&quot; as=&quot;slider1&quot; template=&quot;catalog/navigation/getImage.phtml&quot; /&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;
Don&#39;t forget to create the appropriate folders in the media/banner...&lt;br /&gt;
Hope this helps! Godbless!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/5653202622347781019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/11/magento-embed-jquery-image-rotator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/5653202622347781019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/5653202622347781019'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/11/magento-embed-jquery-image-rotator.html' title='Magento - Embed Jquery Image Rotator'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-1308456177220410843</id><published>2010-11-09T20:15:00.001-08:00</published><updated>2010-11-11T20:33:32.125-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento email"/><category scheme="http://www.blogger.com/atom/ns#" term="magento product image in email"/><category scheme="http://www.blogger.com/atom/ns#" term="magento transaction email"/><title type='text'>Magento - Add Thumbnail Image in Transaction email</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;A client requested adding product thumbnail images in the Order Confirmation Email that is sent after a customer order a product.. Without much ado here&#39;s the code...&lt;br /&gt;&lt;br /&gt;       &amp;lt;?php //added for sending image with order&lt;br /&gt;            $product = Mage::getModel(&#39;catalog/product&#39;)&lt;br /&gt;            -&amp;gt;setStoreId($_item-&amp;gt;getOrder()-&amp;gt;getStoreId())&lt;br /&gt;            -&amp;gt;load($_item-&amp;gt;getProductId());&lt;br /&gt;        ?&amp;gt;   &lt;br /&gt;            &amp;lt;p align=&quot;center&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo Mage::helper(&#39;catalog/image&#39;)-&amp;gt;init($product, &#39;image&#39;)-&amp;gt;resize(50); ?&amp;gt;&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;add this snippet below &amp;lt;td align=&quot;left&quot; valign=&quot;top&quot; style=&quot;padding:3px 9px&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;NOTE: Don&#39;t forget to allow Display of Image in your email client (mine is gmail)&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/1308456177220410843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/11/magento-add-thumbnail-image-in.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1308456177220410843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1308456177220410843'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/11/magento-add-thumbnail-image-in.html' title='Magento - Add Thumbnail Image in Transaction email'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-1987166999028008866</id><published>2010-09-16T02:43:00.000-07:00</published><updated>2010-09-16T19:52:44.573-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="display brand logo using brand name"/><category scheme="http://www.blogger.com/atom/ns#" term="Magento::getBaseUrl"/><title type='text'>Display Brand Logo (attribute) of a product depending on the Brand Name</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&amp;lt;!-- ##### CODE TO SET THE BRAND LOGO USING BRAND NAME ##### --&amp;gt;&lt;br /&gt;           &amp;lt;div class=&quot;product-brand-logo&quot;&amp;gt;&lt;br /&gt;            &amp;lt;?php $brandname = $_product-&amp;gt;getbrand_name() ?&amp;gt;&lt;br /&gt;            &amp;lt;img src=&quot;&amp;lt;?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . &quot;brandlogo/&quot; .$brandname . &quot;.png&quot;; ?&amp;gt;&quot;  /&amp;gt;   &lt;br /&gt;        &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;I just fetched the brand name and put it inside a variable and then fetched the image using Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA)&lt;br /&gt;&lt;br /&gt;reference:&lt;br /&gt;&lt;a href=&quot;http://www.magentocommerce.com/boards/viewthread/9701/&quot; target=&quot;_blank&quot;&gt;http://www.magentocommerce.com/boards/viewthread/9701/&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://activecodeline.com/retrieving-url-paths-in-magento&quot; target=&quot;_blank&quot;&gt;http://activecodeline.com/retrieving-url-paths-in-magento&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/1987166999028008866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/09/display-brand-logo-attribute-of-product.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1987166999028008866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/1987166999028008866'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/09/display-brand-logo-attribute-of-product.html' title='Display Brand Logo (attribute) of a product depending on the Brand Name'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-8663950879160329754</id><published>2010-09-10T03:03:00.001-07:00</published><updated>2010-09-16T19:46:12.694-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="display cms pages in homepage via static blocks"/><category scheme="http://www.blogger.com/atom/ns#" term="magento cms static blocks"/><title type='text'>How to easily display Magento cms pages in the home page using Static blocks</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;ul&gt;&lt;li&gt;display links of your cms pages within a static block&lt;/li&gt;&lt;li&gt;use footer.phtml as the container for all the static blocks that we&#39;ll create&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Files to modify:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;footer.phtml&lt;/li&gt;&lt;li&gt;page.xml (optional)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;styles.css (for styling the blocks)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;-------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First go to your magento backend.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;create a page in CMS/PAGES (then take note of the url key-&amp;gt; we&#39;ll use that in the static block)&lt;/li&gt;&lt;li&gt;then create a new static block in CMS/STATIC BLOCKS&lt;/li&gt;&lt;li&gt;in the create static block page - take note of the identifier (we&#39;ll use that for making our block appear at the home page)&lt;/li&gt;&lt;li&gt;now to insert a link of your cms page in the static block insert this code&lt;/li&gt;&lt;/ul&gt;      &lt;br /&gt;&amp;lt;a href=&quot;{{store direct_url=&quot;url-key-from-the-cms-page&quot;}}&quot;&amp;gt;Title-Of-The_link&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Modify the footer.phtml and put something linke this:&lt;br /&gt;&lt;br /&gt;&amp;lt;div class=&quot;footer-links&quot;&amp;gt;&lt;br /&gt;    &amp;lt;div class=&quot;footer-block&quot;&amp;gt;&lt;br /&gt;        &amp;lt;?php echo $this-&amp;gt;getLayout()-&amp;gt;createBlock(&#39;cms/block&#39;)-&amp;gt;setBlockId(&#39;bestellen&#39;)-&amp;gt;toHtml() ?&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;NOTE: Remember the identifier that I told you to take note? put that inside the setBlockId(&#39;&lt;b&gt;identifier-here&lt;/b&gt;&#39;)&lt;br /&gt;-------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Modify the page.xml (optional)&lt;br /&gt;&lt;br /&gt;if you want to clear the contents of the footer just comment out the &amp;lt;blocks&amp;gt; inside the main &amp;lt;block&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;block type=&quot;page/html_footer&quot; name=&quot;footer&quot; as=&quot;footer&quot; template=&quot;page/html/footer.phtml&quot;&amp;gt;&lt;br /&gt;                &amp;lt;block type=&quot;page/html_wrapper&quot; name=&quot;bottom.container&quot; as=&quot;bottomContainer&quot; translate=&quot;label&quot;&amp;gt;&lt;br /&gt;                      &amp;lt;label&amp;gt;Page Footer&amp;lt;/label&amp;gt;&lt;br /&gt;                      &amp;lt;action method=&quot;setElementClass&quot;&amp;gt;&amp;lt;value&amp;gt;bottom-container&amp;lt;/value&amp;gt;&amp;lt;/action&amp;gt;&lt;br /&gt;                &amp;lt;/block&amp;gt;&lt;br /&gt;                &amp;lt;!-- &amp;lt;block type=&quot;page/switch&quot; name=&quot;store_switcher&quot; as=&quot;store_switcher&quot; template=&quot;page/switch/stores.phtml&quot;/&amp;gt;&lt;br /&gt;                &amp;lt;block type=&quot;page/template_links&quot; name=&quot;footer_links&quot; as=&quot;footer_links&quot; template=&quot;page/template/links.phtml&quot;/&amp;gt;&lt;br /&gt;                &amp;lt;block type=&quot;page/template_links&quot; name=&quot;bestellen&quot; as=&quot;bestellen&quot; template=&quot;page/template/bestellen.phtml&quot;/&amp;gt;--&amp;gt;&lt;br /&gt;&amp;lt;/block&amp;gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------&lt;br /&gt;you can style your blocks by giving it a class and defining the class in styles.css&lt;br /&gt;&lt;br /&gt;We&#39;re done! Hope this helps!&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/8663950879160329754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/09/how-to-easily-display-magento-cms-pages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/8663950879160329754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/8663950879160329754'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/09/how-to-easily-display-magento-cms-pages.html' title='How to easily display Magento cms pages in the home page using Static blocks'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-450349413113877993</id><published>2010-09-09T23:59:00.001-07:00</published><updated>2010-11-23T00:23:07.558-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="display category in homepage"/><category scheme="http://www.blogger.com/atom/ns#" term="magento category"/><category scheme="http://www.blogger.com/atom/ns#" term="magento homepage category"/><title type='text'>Display Categories in the Home page</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;ul&gt;&lt;li&gt;Display Categories in the Home page&lt;/li&gt;&lt;li&gt;Display a random product&#39;s picture with the category name&lt;/li&gt;&lt;li&gt;It can only fetch the 1st level category&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;-----------------------------------------------------------------------------------------------------&lt;br/&gt;/* PUT THIS CODE IN CATALOG/CATEGORY/LIST.PHTML (create it if not present) */&lt;br/&gt;&lt;br/&gt;    &amp;lt;?php // Iterate all categories in store&lt;br/&gt;    $limit = 0;&lt;br/&gt;    $_helper    = $this-&amp;gt;helper(&#39;catalog/output&#39;);&lt;br/&gt;    foreach ($this-&amp;gt;getStoreCategories() as $_category):&lt;br/&gt;&lt;br/&gt;        // If category is Active&lt;br/&gt;        if($_category-&amp;gt;getIsActive()):&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;            // Load the actual category object for this category&lt;br/&gt;            $cur_category = Mage::getModel(&#39;catalog/category&#39;)-&amp;gt;load($_category-&amp;gt;getId());&lt;br/&gt;&lt;br/&gt;            if ($_imgUrl = $cur_category-&amp;gt;getImageUrl()){&lt;br/&gt;&lt;br/&gt;                $_imgHtml = &#39;&amp;lt;img src=&quot;&#39;.$_imgUrl.&#39;&quot; alt=&quot;&#39;.$this-&amp;gt;htmlEscape($cur_category-&amp;gt;getName()).&#39;&quot; title=&quot;&#39;.$this-&amp;gt;htmlEscape($cur_category-&amp;gt;getName()).&#39;&quot;  width=&quot;105px&quot; /&amp;gt;&#39;;&lt;br/&gt;                $_imgHtml = $_helper-&amp;gt;categoryAttribute($cur_category, $_imgHtml, &#39;image&#39;);&lt;br/&gt;            } ?&amp;gt;&lt;br/&gt;             &amp;lt;div class=&quot;home-category&quot;&amp;gt;&lt;br/&gt;                &amp;lt;div class=&quot;linkimage&quot;&amp;gt;&lt;br/&gt;                    &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getCategoryUrl($cur_category) ?&amp;gt;&quot; style=&quot;border:none&quot;&amp;gt;&lt;br/&gt;                    &amp;lt;?php echo $_imgHtml; ?&amp;gt;&lt;br/&gt;                    &amp;lt;/a&amp;gt;&lt;br/&gt;                &amp;lt;/div&amp;gt;&lt;br/&gt;                &amp;lt;div class=&quot;category-link-container&quot;&amp;gt;&lt;br/&gt;                &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;getCategoryUrl($cur_category) ?&amp;gt;&quot;&amp;gt;&lt;br/&gt;                       &amp;lt;?php echo $_helper-&amp;gt;categoryAttribute($cur_category, $cur_category-&amp;gt;getName(), &#39;name&#39;) ?&amp;gt;&lt;br/&gt;                &amp;lt;/a&amp;gt;&lt;br/&gt;                &amp;lt;/div&amp;gt;&lt;br/&gt;            &amp;lt;/div&amp;gt;&lt;br/&gt;&amp;lt;?php&lt;br/&gt;           $limit+=1;&lt;br/&gt;        endif;&lt;br/&gt;&lt;br/&gt;        if ($limit==8):&lt;br/&gt;            break;&lt;br/&gt;        endif;&lt;br/&gt;&lt;br/&gt;    endforeach;&lt;br/&gt;?&amp;gt;&lt;br/&gt;&lt;br/&gt;----------------------------------------------------------------------------------------------------------&lt;br/&gt;/* PUT THIS CODE IN THE CMS/PAGES/HOME*/&lt;br/&gt;/* IF YOU WANT TO HARDCODE IT PLACE THIS IN LAYOUT/PAGE.XML -&amp;gt; &quot;Custom page layout handles&quot; AREA */&lt;br/&gt;&lt;br/&gt;{{block type=&quot;catalog/navigation&quot; name=&quot;catalog.category&quot; template=&quot;catalog/category/list.phtml&quot;}}&lt;br/&gt;----------------------------------------------------------------------------------------------------------&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href=&#39;http://www.magentocommerce.com/boards/viewthread/14527/&#39; target=&#39;_blank&#39;&gt;Reference&lt;/a&gt;&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/450349413113877993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/09/display-categories-in-home-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/450349413113877993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/450349413113877993'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/09/display-categories-in-home-page.html' title='Display Categories in the Home page'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-6153677742392741666</id><published>2010-09-03T01:02:00.001-07:00</published><updated>2010-09-16T19:39:55.162-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IE Conditional Comment"/><title type='text'>IE Conditional Comment</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;This is a conditional comment. This is used to add extra tags if ever your webpage is opened in IE6 browser.&lt;br /&gt;&lt;br /&gt;&amp;lt;!--[if IE 6]&amp;gt;&lt;br /&gt;    &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;js/shadowbox3/shadowbox-ie6.css&quot;&amp;gt;&lt;br /&gt;&amp;lt;![endif]--&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://css-tricks.com/how-to-create-an-ie-only-stylesheet/&quot; target=&quot;_blank&quot;&gt;More Info&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/6153677742392741666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/09/ie-conditional-comment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6153677742392741666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6153677742392741666'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/09/ie-conditional-comment.html' title='IE Conditional Comment'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-8506822559571783178</id><published>2010-08-26T01:52:00.001-07:00</published><updated>2010-09-16T19:37:55.894-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript for shadowbox"/><category scheme="http://www.blogger.com/atom/ns#" term="shadowbox disable background scrolling"/><title type='text'>javascript that will hide and display the body scrollbar using shadowbox</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;function scrollBackground() {&lt;br /&gt;            // Disables background screen scrolling while viewing shadowbox popups&lt;br /&gt;          &lt;br /&gt;            // Copyright 2010 Peter Smith&lt;br /&gt;            // Usage: Allowed if copyright statement remains&lt;br /&gt;&lt;br /&gt;            // add the following to the Shadowbox.init ({})&lt;br /&gt;            // onOpen: scrollBackground, onClose: scrollBackground&lt;br /&gt;&lt;br /&gt;            // Get a reference to the HTML element&lt;br /&gt;            var objHTML = document.getElementsByTagName(&quot;html&quot;).item(0);&lt;br /&gt;          &lt;br /&gt;            // Hide/show scrollbar&lt;br /&gt;            if (objHTML.style.overflow == &quot;hidden&quot;) {&lt;br /&gt;                objHTML.style.overflow = &quot;auto&quot;;&lt;br /&gt;            } else {&lt;br /&gt;                objHTML.style.overflow = &quot;hidden&quot;;&lt;br /&gt;                // Hiding the vertical scrollbar and having the webpage centered makes the content jump across by the amount of the scrollbars width&lt;br /&gt;                // this adjust that if html width is not set i.e. it only fires once.&lt;br /&gt;                if (objHTML.style.width == &quot;&quot;) objHTML.style.width = &quot;&quot; + parseInt(objHTML.offsetWidth - 17) + &quot;px&quot;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/8506822559571783178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/08/javascript-that-will-hide-and-display.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/8506822559571783178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/8506822559571783178'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/08/javascript-that-will-hide-and-display.html' title='javascript that will hide and display the body scrollbar using shadowbox'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-3539041091632965280</id><published>2010-08-26T01:51:00.001-07:00</published><updated>2011-03-30T20:29:12.600-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="header slider"/><category scheme="http://www.blogger.com/atom/ns#" term="magento category"/><category scheme="http://www.blogger.com/atom/ns#" term="magento products"/><title type='text'>magento bits and pieces</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #007700;&quot;&gt;//this snippet will create a black bg for a product image &lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;img&amp;nbsp;src&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;&amp;lt;?php&amp;nbsp;echo&amp;nbsp;$this-&amp;gt;helper(&#39;catalog/image&#39;)-&amp;gt;init($_product,&amp;nbsp;&#39;small_image&#39;)-&amp;gt;backgroundColor(array(0,0,0))-&amp;gt;resize(135,135);&amp;nbsp;?&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
//this snippet will add to cart a product in the homepage&lt;br /&gt;
&amp;lt;button type=&quot;button&quot; title=&quot;&amp;lt;?php echo $this-&amp;gt;__(&#39;Add to Cart&#39;) ?&amp;gt;&quot; class=&quot;button btn-cart&quot; onclick=&quot;setLocation(&#39;&amp;lt;?php echo $this-&amp;gt;helper(&#39;checkout/cart&#39;)-&amp;gt;getAddUrl($_product) ?&amp;gt;&#39;)&quot;&amp;gt;&amp;lt;span &amp;gt;&amp;lt;span&amp;nbsp; style=&quot;padding:0px; font-size:12px;&quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;__(&#39;Bestel&#39;) ?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//this will get the correct translation for you custom attribute, should be enabled for product listing&lt;br /&gt;
$category_label = $_product-&amp;gt;getResource()-&amp;gt;getAttribute(&#39;category_name&#39;)-&amp;gt;getStoreLabel($isyan);&lt;br /&gt;
&lt;br /&gt;
$isyan = Mage::getModel(&#39;catalog/product&#39;)-&amp;gt;load($_product-&amp;gt;getId());&lt;br /&gt;
&lt;br /&gt;
how to get label and value of magento attribute separately&lt;br /&gt;
$kwaliteit_label = $_product-&amp;gt;getResource()-&amp;gt;getAttribute(&#39;kwaliteit_omschrijving&#39;)-&amp;gt;getFrontend()-&amp;gt;&lt;b&gt;getLabel($_product);&lt;/b&gt;&lt;br /&gt;
$kwaliteit_value = $_product-&amp;gt;getResource()-&amp;gt;getAttribute(&#39;kwaliteit_omschrijving&#39;)-&amp;gt;getFrontend()-&amp;gt;&lt;b&gt;getValue($_product);&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
then echo them&lt;br /&gt;
&lt;b&gt;echo $kwaliteit_label;&lt;br /&gt;
echo $kwaliteit_value;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
code snippet that will ge the products of every category&lt;br /&gt;
_getCategoryInstance()-&amp;gt;getProductCount() ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
snippet that will get the homepage url of your magento website&lt;br /&gt;
Mage::getBaseUrl()&lt;br /&gt;
&lt;reference content=&quot;&quot; name=&quot;&quot;&gt;&lt;reference name=&quot;left&quot;&gt;&lt;reference name=&quot;head&quot;&gt;&lt;action method=&quot;addItem&quot;&gt;&lt;name&gt;&lt;br /&gt;
this snippet will load a specific directory&lt;br /&gt;
load(3) ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then you can append the methods below to get something more specific&lt;br /&gt;
&lt;/name&gt;&lt;/action&gt;&lt;/reference&gt;load(3)-&amp;gt;getUrl() ?&amp;gt;&lt;br /&gt;
&lt;reference content=&quot;&quot; name=&quot;&quot;&gt;&lt;reference name=&quot;left&quot;&gt;&lt;reference name=&quot;head&quot;&gt;&lt;br /&gt;
methods of Magento Category&lt;br /&gt;
&lt;/reference&gt;&lt;/reference&gt;&lt;/reference&gt;&lt;/reference&gt;&lt;/reference&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;code&gt;getName()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;getUrl()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;getImageUrl()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;getProductCount()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ////CUT THE PRODUCT NAME BECAUSE TOO LONG FOR THE TEMPLATE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; $productname = $this-&amp;gt;htmlEscape($_product-&amp;gt;getName());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; $productname = substr($productname , 0, 15) . &#39;&lt;b&gt;...&lt;/b&gt;&#39;; &lt;br /&gt;
&amp;nbsp; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Singles&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;//get current controller name&lt;/span&gt;&lt;br /&gt;
$this-&amp;gt;getRequest()-&amp;gt;getControllerName(); //returns string&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;//get Action Name&lt;/span&gt;&lt;br /&gt;
$this-&amp;gt;getRequest()-&amp;gt;getActionName(); //returns string&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;//get Module Name&lt;/span&gt;&lt;br /&gt;
$this-&amp;gt;getRequest()-&amp;gt;getModuleName(); //returns string&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;//get Number of items in user cart&lt;/span&gt;&lt;br /&gt;
$this-&amp;gt;helper(&#39;checkout/cart&#39;)-&amp;gt;getSummaryCount(); //returns number of products&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;//check if user is logged in&lt;/span&gt;&lt;br /&gt;
if ($this-&amp;gt;helper(&#39;customer&#39;)-&amp;gt;isLoggedIn()) //returns true/false&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Combinations&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;//check if user is on home page&lt;/b&gt;&lt;br /&gt;
if ($this-&amp;gt;getIsHomePage()) { } //returns true/false&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: 10px;&quot;&gt;//check for home page only works when in header.phtml&lt;br /&gt;
//use method below if outside of this file or&lt;br /&gt;
//create new instance of:&lt;br /&gt;
//Mage_Page_Block_Html_Header() like so:&lt;br /&gt;
//$newHeaderObject = new Mage_Page_Block_Html_Header();//&lt;br /&gt;
if($newHeaderObject -&amp;gt;getIsHomePage()){} // returns true/false&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;//alternative method&lt;/b&gt;&lt;br /&gt;
if&lt;br /&gt;
(($this-&amp;gt;getRequest()-&amp;gt;getModuleName() == &#39;cms&#39;) &amp;amp;&amp;amp; &lt;br /&gt;
($this-&amp;gt;getRequest()-&amp;gt;getActionName() == &#39;index&#39;)) { } //returns &lt;br /&gt;
true/false&lt;span style=&quot;color: red; font-size: 10px;&quot;&gt;&lt;br /&gt;
//use this to check if home page in other template (.phtml) files&lt;br /&gt;
//works by checking the module name and the action request.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: 10px;&quot;&gt;//this is an alternative if getLayout is not working &lt;/span&gt;&lt;br /&gt;
&amp;lt;?php  &lt;br /&gt;
$L = Mage::getSingleton(&#39;core/layout&#39;); &lt;br /&gt;
echo $L-&amp;gt;createBlock(&#39;cms/block&#39;)-&amp;gt;setBlockId(&#39;STATIC_BLOCK_IDENTIFIER&#39;)-&amp;gt;toHtml(); &lt;br /&gt;
?&amp;gt;&amp;nbsp; &lt;span style=&quot;color: red; font-size: 10px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: 10px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;Load the product attributes&lt;br /&gt;
$isyan=Mage::getModel(&#39;catalog/product&#39;)-&amp;gt;load($_product-&amp;gt;getId());&lt;br /&gt;
&lt;br /&gt;
//Getting an attribute and displaying it in product view&lt;br /&gt;
Then use &quot;get&quot; + attribute code to display the value&lt;br /&gt;
$brandname = $isyan-&amp;gt;getMerknaam_artikelen();&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/3539041091632965280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/08/magento-bits-and-pieces.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/3539041091632965280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/3539041091632965280'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/08/magento-bits-and-pieces.html' title='magento bits and pieces'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-6296778899820970091</id><published>2010-08-11T01:02:00.001-07:00</published><updated>2010-09-10T19:02:03.453-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="check user login"/><category scheme="http://www.blogger.com/atom/ns#" term="magento administration"/><category scheme="http://www.blogger.com/atom/ns#" term="magento backend"/><category scheme="http://www.blogger.com/atom/ns#" term="magento programming"/><title type='text'>Check if user is logged-in in Magento backend</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;This code snippet will check if a user is currently logged-in on magento backend.. this is useful if you want to integrate pages to your magento website, of course you must check if the user that is accessing the said page is an authenticated user of your magento administration.. that is where this code comes into play.. hope this helps&lt;br /&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;require_once &#39;../app/Mage.php&#39;;&lt;br /&gt;umask(0);&lt;br /&gt;&lt;br /&gt;$app = Mage::app(&#39;default&#39;);&lt;br /&gt;&lt;br /&gt;/* Init User Session */&lt;br /&gt;Mage::getSingleton(&#39;core/session&#39;, array(&#39;name&#39;=&amp;gt;&#39;adminhtml&#39;));&lt;br /&gt;$session = Mage::getSingleton(&#39;admin/session&#39;);&lt;br /&gt;&lt;br /&gt;if ($session-&amp;gt;isLoggedIn()) {&lt;br /&gt;&lt;br /&gt;/* do something if logged in */&lt;br /&gt;echo &quot;the user is logged in&quot;;&lt;br /&gt;&lt;br /&gt;} else {&lt;br /&gt;/* do something else if not logged in */&lt;br /&gt;echo &quot;the user is NOT logged in&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/6296778899820970091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/08/check-if-user-is-loggedin-in-magento.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6296778899820970091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/6296778899820970091'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/08/check-if-user-is-loggedin-in-magento.html' title='Check if user is logged-in in Magento backend'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-7780591698638807067</id><published>2010-08-10T23:45:00.001-07:00</published><updated>2010-09-10T19:24:53.425-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="magento backend"/><category scheme="http://www.blogger.com/atom/ns#" term="magento configurable menu"/><category scheme="http://www.blogger.com/atom/ns#" term="magento permission"/><title type='text'>How to put a configurable menu in magento backend?</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;I used up almost two weeks just to get this to work... :(&lt;br /&gt;This Menu can be configured to be displayed in a specific user... (so it means you can see this module in the permission-&amp;gt;role resources&lt;br /&gt;&lt;ul&gt;&lt;li&gt;First is create a Basic Magento Module (recommended to put it in app/code/local)&lt;/li&gt;&lt;/ul&gt;NOTE: this is just a blog for me to remember or review my achievements so please search the Internet for terminologies or actions that you don&#39;t understand.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Then in your module&#39;s etc/config.xml put this code&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&amp;lt;adminhtml&amp;gt;&lt;br /&gt;&amp;lt;acl&amp;gt;&lt;br /&gt;&amp;lt;resources&amp;gt;&lt;br /&gt;&amp;lt;admin&amp;gt;&lt;br /&gt;&amp;lt;children&amp;gt;&lt;br /&gt;&amp;lt;helloworld_options translate=&quot;label&quot; module=&quot;helloworld&quot;&amp;gt;&lt;br /&gt;   &amp;lt;title&amp;gt;PRESTOTYPE MENU&amp;lt;/title&amp;gt;&lt;br /&gt;   &amp;lt;sort_order&amp;gt;999&amp;lt;/sort_order&amp;gt;&lt;br /&gt;   &amp;lt;children&amp;gt;&lt;br /&gt;     &amp;lt;hello_children1&amp;gt;&lt;br /&gt;       &amp;lt;title&amp;gt;PRESTOTYPE RELATION&amp;lt;/title&amp;gt;&lt;br /&gt;       &amp;lt;sort_order&amp;gt;10&amp;lt;/sort_order&amp;gt;&lt;br /&gt;     &amp;lt;/hello_children1&amp;gt;&lt;br /&gt;&lt;br /&gt;     &amp;lt;hello_children2&amp;gt;&lt;br /&gt;       &amp;lt;title&amp;gt;PRESTOTYPE MACHINE&amp;lt;/title&amp;gt;&lt;br /&gt;       &amp;lt;sort_order&amp;gt;20&amp;lt;/sort_order&amp;gt;&lt;br /&gt;     &amp;lt;/hello_children2&amp;gt;&lt;br /&gt; &lt;br /&gt;     &amp;lt;hello_children3&amp;gt;&lt;br /&gt;       &amp;lt;title&amp;gt;PRESTOTYPE INVOICE&amp;lt;/title&amp;gt;&lt;br /&gt;       &amp;lt;sort_order&amp;gt;30&amp;lt;/sort_order&amp;gt;&lt;br /&gt;     &amp;lt;/hello_children3&amp;gt;&lt;br /&gt;  &amp;lt;/children&amp;gt;&lt;br /&gt; &amp;lt;/helloworld_options&amp;gt;&lt;br /&gt;                 &lt;br /&gt;       &amp;lt;system&amp;gt;&lt;br /&gt;         &amp;lt;children&amp;gt;&lt;br /&gt;            &amp;lt;config&amp;gt;&lt;br /&gt;               &amp;lt;children&amp;gt;&lt;br /&gt;                  &amp;lt;helloworld_options translate=&quot;label&quot; module=&quot;helloworld&quot;&amp;gt;&lt;br /&gt;                     &amp;lt;title&amp;gt;PRESTOTYPE MENU&amp;lt;/title&amp;gt;&lt;br /&gt;                  &amp;lt;/helloworld_options&amp;gt;&lt;br /&gt;               &amp;lt;/children&amp;gt;&lt;br /&gt;            &amp;lt;/config&amp;gt;&lt;br /&gt;         &amp;lt;/children&amp;gt;&lt;br /&gt;       &amp;lt;/system&amp;gt;&lt;br /&gt;     &amp;lt;/children&amp;gt;&lt;br /&gt;   &amp;lt;/admin&amp;gt;&lt;br /&gt; &amp;lt;/resources&amp;gt;&lt;br /&gt;&amp;lt;/acl&amp;gt;&lt;br /&gt;&amp;lt;/adminhtml&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Then in your module&#39;s etc/system.xml put this code&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&amp;lt;config&amp;gt;&lt;br /&gt;  &amp;lt;tabs&amp;gt;&lt;br /&gt;      &amp;lt;hellotest translate=&quot;label&quot; module=&quot;helloworld&quot;&amp;gt;&lt;br /&gt;          &amp;lt;label&amp;gt;Hello Testing&amp;lt;/label&amp;gt;&lt;br /&gt;              &amp;lt;sort_order&amp;gt;9999&amp;lt;/sort_order&amp;gt;&lt;br /&gt;      &amp;lt;/hellotest&amp;gt;&lt;br /&gt;  &amp;lt;/tabs&amp;gt;&lt;br /&gt;                    &lt;br /&gt;  &amp;lt;sections&amp;gt;&lt;br /&gt;      &amp;lt;hellotest translate=&quot;label&quot; module=&quot;helloworld&quot;&amp;gt;&lt;br /&gt;          &amp;lt;label&amp;gt;INVENTORY&amp;lt;/label&amp;gt;&lt;br /&gt;          &amp;lt;tab&amp;gt;hellotest&amp;lt;/tab&amp;gt;&lt;br /&gt;          &amp;lt;frontend_type&amp;gt;text&amp;lt;/frontend_type&amp;gt;&lt;br /&gt;          &amp;lt;action&amp;gt;helloworld/index/goodbye&amp;lt;/action&amp;gt;&lt;br /&gt;          &amp;lt;sort_order&amp;gt;1000&amp;lt;/sort_order&amp;gt;&lt;br /&gt;          &amp;lt;show_in_default&amp;gt;1&amp;lt;/show_in_default&amp;gt;&lt;br /&gt;          &amp;lt;show_in_website&amp;gt;1&amp;lt;/show_in_website&amp;gt;&lt;br /&gt;          &amp;lt;show_in_store&amp;gt;1&amp;lt;/show_in_store&amp;gt;&lt;br /&gt;      &amp;lt;/hellotest&amp;gt;&lt;br /&gt;  &amp;lt;/sections&amp;gt;&lt;br /&gt;&amp;lt;/config&amp;gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Then in your module&#39;s etc/adminhtml.xml put this code&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&amp;lt;config&amp;gt;&lt;br /&gt;  &amp;lt;menu&amp;gt;&lt;br /&gt;     &amp;lt;helloworld_options translate=&quot;title&quot; module=&quot;helloworld&quot;&amp;gt;&lt;br /&gt;         &amp;lt;title&amp;gt;Prestotype Inventory&amp;lt;/title&amp;gt;&lt;br /&gt;         &amp;lt;sort_order&amp;gt;110&amp;lt;/sort_order&amp;gt;&lt;br /&gt;         &amp;lt;children&amp;gt;&lt;br /&gt;            &amp;lt;hello_children1&amp;gt;&lt;br /&gt;               &amp;lt;title&amp;gt;Relation&amp;lt;/title&amp;gt;&lt;br /&gt;               &amp;lt;action&amp;gt;helloworld/index/relation&amp;lt;/action&amp;gt;&lt;br /&gt;               &amp;lt;sort_order&amp;gt;10&amp;lt;/sort_order&amp;gt;&lt;br /&gt;            &amp;lt;/hello_children1&amp;gt;&lt;br /&gt;            &amp;lt;hello_children2&amp;gt;&lt;br /&gt;               &amp;lt;title&amp;gt;Machine&amp;lt;/title&amp;gt;&lt;br /&gt;               &amp;lt;action&amp;gt;helloworld/index/machine&amp;lt;/action&amp;gt;&lt;br /&gt;               &amp;lt;sort_order&amp;gt;0&amp;lt;/sort_order&amp;gt;&lt;br /&gt;            &amp;lt;/hello_children2&amp;gt;&lt;br /&gt;            &amp;lt;hello_children3&amp;gt;&lt;br /&gt;               &amp;lt;title&amp;gt;Invoice&amp;lt;/title&amp;gt;&lt;br /&gt;               &amp;lt;action&amp;gt;helloworld/index/invoice&amp;lt;/action&amp;gt;&lt;br /&gt;               &amp;lt;sort_order&amp;gt;100&amp;lt;/sort_order&amp;gt;&lt;br /&gt;            &amp;lt;/hello_children3&amp;gt;&lt;br /&gt;        &amp;lt;/children&amp;gt;&lt;br /&gt;     &amp;lt;/helloworld_options&amp;gt;&lt;br /&gt;   &amp;lt;/menu&amp;gt;&lt;br /&gt;&amp;lt;/config&amp;gt;&lt;/pre&gt;That&#39;s IT! BUT what if I want to put an action to the menu like it will open up a new page with the url that I specified? You can put javascript to open a new window.. Here&#39;s how&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In your module&#39;s controllers/IndexController.php put this code&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;public function relationAction() {&lt;br /&gt;  echo &quot;&amp;lt;script&amp;gt;window.open (&#39;http://www.yahoo.com&#39;,&#39;mywindow&#39;)&amp;lt;/script&amp;gt;&quot;;&lt;br /&gt;  echo &quot;&amp;lt;script&amp;gt;window.location = &#39;http://127.0.0.1/magento-backend-menu/admin&#39;&amp;lt;/script&amp;gt;&quot;;}&lt;br /&gt;&lt;br /&gt;public function machineAction() {&lt;br /&gt;  echo &quot;&amp;lt;script&amp;gt;window.open (&#39;http://www.stitambayan.com&#39;,&#39;mywindow&#39;)&amp;lt;/script&amp;gt;&quot;;&lt;br /&gt;  echo &quot;&amp;lt;script&amp;gt;window.location = &#39;http://127.0.0.1/magento-backend-menu/admin&#39;&amp;lt;/script&amp;gt;&quot;;}&lt;br /&gt;&lt;br /&gt;public function invoiceAction() {&lt;br /&gt;  echo &quot;&amp;lt;script&amp;gt;window.open (&#39;http://www.yahoo.com&#39;,&#39;mywindow&#39;)&amp;lt;/script&amp;gt;&quot;;&lt;br /&gt;  echo &quot;&amp;lt;script&amp;gt;window.location = &#39;http://127.0.0.1/magento-backend-menu/admin&#39;&amp;lt;/script&amp;gt;&quot;;}&lt;br /&gt;&lt;br /&gt;public function goodbyeAction() {&lt;br /&gt;  echo &quot;&amp;lt;script&amp;gt;window.open (&#39;http://www.javascript-coder.com&#39;,&#39;mywindow&#39;)&amp;lt;/script&amp;gt;&quot;;}&lt;br /&gt;&lt;/pre&gt;I just downloaded a sample module and tweaked it... from this url&lt;br /&gt;&lt;a href=&quot;http://alanstorm.com/custom_magento_system_configuration&quot;&gt;&lt;b&gt;http://alanstorm.com/custom_magento_system_configuration&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/7780591698638807067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/08/how-to-put-configurable-menu-in-magento.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/7780591698638807067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/7780591698638807067'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/08/how-to-put-configurable-menu-in-magento.html' title='How to put a configurable menu in magento backend?'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3331373492104780621.post-944812218220429037</id><published>2010-07-29T01:53:00.001-07:00</published><updated>2010-08-11T00:05:35.611-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="magento session"/><category scheme="http://www.blogger.com/atom/ns#" term="magento using firefox"/><title type='text'>Cannot login on Magento backend using Firefox</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;I encountered this problem whenever I&#39;m installing a new Magento Shop in my localhost, so it&#39;s best to post it here..&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Problem&lt;/b&gt;&lt;br /&gt;The problem occurs because magento could not store cookies. We run it as&lt;br /&gt;localhost and localhost is not a true domain but to store cookies we need&lt;br /&gt;a domain. That’s why the login stops without saying any word.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;br /&gt;1. If you don&#39;t want to dig in the Magento Core files you can set the url to &lt;u&gt;&lt;b&gt;127.0.0.1/path-to-your-magento-directory/&lt;/b&gt;&lt;/u&gt; at the start of your installation. &amp;lt;THAT&#39;S IT!&amp;gt;&lt;br /&gt;&lt;br /&gt;2. BUT... if that doesn&#39;t work, you should dirty your hands :) after installation go to this path in your magento folder &lt;u&gt;&lt;strong&gt;app/code/core/Mage/Core/Model/Session/Abstract/Varien.php&lt;/strong&gt;&lt;/u&gt;&lt;strong&gt; &lt;/strong&gt;open this file with a text editor or Dreamweaver...&lt;br /&gt;&lt;br /&gt;Find this phrase &quot;&lt;b&gt;session cookie&lt;/b&gt;&quot; by pressing CTRL+F and you will see this code from line 77 to 94&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;// session cookie params&lt;br /&gt;        $cookieParams = array(&lt;br /&gt;            &#39;lifetime&#39; =&amp;gt; $cookie-&amp;gt;getLifetime(),&lt;br /&gt;            &#39;path&#39;     =&amp;gt; $cookie-&amp;gt;getPath(),&lt;br /&gt;            &#39;domain&#39;   =&amp;gt; $cookie-&amp;gt;getConfigDomain(),&lt;br /&gt;            &#39;secure&#39;   =&amp;gt; $cookie-&amp;gt;isSecure(),&lt;br /&gt;            &#39;httponly&#39; =&amp;gt; $cookie-&amp;gt;getHttponly()&lt;br /&gt;        );&lt;br /&gt;&lt;br /&gt;        if (!$cookieParams[&#39;httponly&#39;]) {&lt;br /&gt;            unset($cookieParams[&#39;httponly&#39;]);&lt;br /&gt;            if (!$cookieParams[&#39;secure&#39;]) {&lt;br /&gt;                unset($cookieParams[&#39;secure&#39;]);&lt;br /&gt;                if (!$cookieParams[&#39;domain&#39;]) {&lt;br /&gt;                    unset($cookieParams[&#39;domain&#39;]);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;----------------------------------------------------&lt;br /&gt;I just commented the lines like this&lt;br /&gt;&lt;blockquote&gt; // session cookie params&lt;br /&gt;        $cookieParams = array(&lt;br /&gt;            &#39;lifetime&#39; =&amp;gt; $cookie-&amp;gt;getLifetime(),&lt;br /&gt;            &#39;path&#39;     =&amp;gt; $cookie-&amp;gt;getPath() &lt;b&gt;/*,&lt;br /&gt;            &#39;domain&#39;   =&amp;gt; $cookie-&amp;gt;getConfigDomain(),&lt;br /&gt;            &#39;secure&#39;   =&amp;gt; $cookie-&amp;gt;isSecure(),&lt;br /&gt;            &#39;httponly&#39; =&amp;gt; $cookie-&amp;gt;getHttponly()&lt;/b&gt;&lt;br /&gt;       &lt;b&gt;*/&lt;/b&gt; );&lt;br /&gt;&lt;br /&gt;       /*  &lt;b&gt;if (!$cookieParams[&#39;httponly&#39;]) {&lt;br /&gt;            unset($cookieParams[&#39;httponly&#39;]);&lt;br /&gt;            if (!$cookieParams[&#39;secure&#39;]) {&lt;br /&gt;                unset($cookieParams[&#39;secure&#39;]);&lt;br /&gt;                if (!$cookieParams[&#39;domain&#39;]) {&lt;br /&gt;                    unset($cookieParams[&#39;domain&#39;]);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;/b&gt; */&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;That&#39;s it! Then try to login again..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://workingmagento.blogspot.com/feeds/944812218220429037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://workingmagento.blogspot.com/2010/07/cannot-login-on-magento-backend-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/944812218220429037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3331373492104780621/posts/default/944812218220429037'/><link rel='alternate' type='text/html' href='http://workingmagento.blogspot.com/2010/07/cannot-login-on-magento-backend-using.html' title='Cannot login on Magento backend using Firefox'/><author><name>Christian Young</name><uri>http://www.blogger.com/profile/01980544731695770612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zdPOJSaskTurPv0TD6mhnk-JsxbrxkO1Yn2X2NFyigYfjiyWSMYPNdYEh9igYRuExwQ4PJFv3kojXzZ5ee7SSYeJo8mHet5xTbhklaIbdfwR5FOiymeTCPg1avwy8w/s220/430214_177.jpg'/></author><thr:total>0</thr:total></entry></feed>