<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog for the Web Programmers &#187; Magento</title>
	<atom:link href="http://blog.chandanweb.com/topics/magento/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.chandanweb.com</link>
	<description>A useful blog with code assitance on Typo3, Drupal, PHP, Apache, OpenSSL and PHP Frameworks</description>
	<lastBuildDate>Thu, 08 Jul 2010 05:44:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Magento &#8211; undefined index in &#8220;toolbar.phtml&#8221; &#8211; after changing default sort by</title>
		<link>http://blog.chandanweb.com/magento/magento-undefined-index-in-toolbar-phtml-after-changing-default-sort-by</link>
		<comments>http://blog.chandanweb.com/magento/magento-undefined-index-in-toolbar-phtml-after-changing-default-sort-by#comments</comments>
		<pubDate>Fri, 19 Feb 2010 07:38:52 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[custom toolbar.phtml]]></category>
		<category><![CDATA[sort by]]></category>
		<category><![CDATA[undefined index]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/uncategorized/magento-undefined-index-in-toolbar-phtml-after-changing-default-sort-by</guid>
		<description><![CDATA[Recently I added a new product-attribute and it was set to be the default sortby attribute. To my surprise, I used to get an undefined index on some categories. I failed to get a clear solution in any of the article from Magentocommerce site. On further investigation I realised that just setting the default sort [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I added a new product-attribute and it was set to be the default sortby attribute. To my surprise, I used to get an undefined index on some categories. <br/>I failed to get a clear solution in any of the article from Magentocommerce site. On further investigation I realised that just setting the default sort by option will not be sufficient. <br/>It is also necessary to check if you have selected this new attribute in the list of &#8220;Available Product Listing Sort by&#8221; for the category which is causing this issue. <br/>So I logged into Magento BE, and used following path <br/><strong>Catalog &gt;&gt; Manage Categories &gt;&gt; Selected the category that raised the error &gt;&gt; Display Settings [TAB] &gt;&gt; Available Product Listing Sort by <br/></strong> Her I noticed that the new product attribute was not selected!!! Seems Simple, still&#8230;!!! <br/><br/>I am not sure if this error can also get triggered when we use default Toolbar.phtml without any modification.</p>
<h4>Additional info:</h4>
<p><strong>Related to</strong>: A custom designed toolbar.phtml which was primarily used to modify list of sortby options. <br/><strong>Scenario</strong>: Error gets displayed when I click on a root category or when I try to use magento search. <br/><strong>Quick Solution</strong>: Make sure you have selected this new attribute in the list of &#8220;Available Product Listing Sort by&#8221; for the category that caused this error. <br/><br/>I am sure this might be rare case, but it can happen. Happy shopping!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/magento/magento-undefined-index-in-toolbar-phtml-after-changing-default-sort-by/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a new product attribute to magento and changing the default sort by option in magento</title>
		<link>http://blog.chandanweb.com/magento/adding-a-new-product-attribute-to-magento-and-changing-the-default-sort-by-option-in-magento</link>
		<comments>http://blog.chandanweb.com/magento/adding-a-new-product-attribute-to-magento-and-changing-the-default-sort-by-option-in-magento#comments</comments>
		<pubDate>Wed, 10 Feb 2010 15:00:11 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[attribute and attribute set]]></category>
		<category><![CDATA[change default sort by]]></category>
		<category><![CDATA[default sort]]></category>
		<category><![CDATA[magento attribute]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/magento/adding-a-new-product-attribute-to-magento-and-setting-default-sort-in-magento</guid>
		<description><![CDATA[The magento screencast on adding a new product attribute is really what would give a clear idea on adding prodcut attribute. Step 1: Follow the screencast and add new attribute http://www.magentocommerce.com/media/screencasts Step 2: Since you want this attribute to be used for sorting on list view, make sure the option &#8220;Used for sorting in product [...]]]></description>
			<content:encoded><![CDATA[<p>The magento screencast on adding a new product attribute is really what would give a clear idea on adding prodcut attribute. <br/><br/><strong>Step 1:</strong> Follow the screencast and add new attribute <br/><a href="http://www.magentocommerce.com/media/screencasts">http://www.magentocommerce.com/media/screencasts</a> <br/><br/><strong>Step 2:</strong> Since you want this attribute to be used for sorting on list view, make sure the option <strong>&#8220;Used for sorting in product listing&#8221;</strong> is set to <strong>YES</strong>.</p>
<p><strong>Step 3:</strong> Add the new attribute to the required attribute set.</p>
<p><strong>Step 4:</strong> Go to System &gt; configuration &gt; Catalog &gt; Catalog &gt; Frontend <br/></p>
<p><strong>Step 5:</strong> Set the <strong>&#8220;Product listing sort by&#8221;</strong> option to the new field you added.</p>
<p><a href="http://blog.chandanweb.com/wp-content/uploads/2010/02/product_default_sort.png"><img src="http://blog.chandanweb.com/wp-content/uploads/2010/02/zrtn_001n297dd1e9_tn.jpg" style="WIDTH: 250px; HEIGHT: 84px" height="84" width="250"/></a></p>
<p>Click on the screenshot above for details.</p>
<p>That&#8217;s all, save the configuration, clear cache (if enabled) and relaod the list view. You should see the new attribute.</p>
<p><strong>NOTE: <br/></strong> If you are using a custom template /package, chances are that you may have to change the code manually to view the new <strong>sort by</strong> field in the selection list. <br/>The code is usually located in in catalog/product/list/toolbar.phtml</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/magento/adding-a-new-product-attribute-to-magento-and-changing-the-default-sort-by-option-in-magento/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding search by Category feature to Magento Advanced search and catlog search in Product list view</title>
		<link>http://blog.chandanweb.com/magento/adding-search-by-category-feature-to-magento-advanced-search-and-catlog-search-in-product-list-view</link>
		<comments>http://blog.chandanweb.com/magento/adding-search-by-category-feature-to-magento-advanced-search-and-catlog-search-in-product-list-view#comments</comments>
		<pubDate>Fri, 29 Jan 2010 06:28:52 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Easily Adding Features to Magento]]></category>
		<category><![CDATA[Easily Extending Features of Magento]]></category>
		<category><![CDATA[Magento Upgrade Safe]]></category>
		<category><![CDATA[Search by Category in Magento]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/magento/adding-search-by-category-feature-to-magento-advanced-search-and-catlog-search-in-product-list-view</guid>
		<description><![CDATA[I recently had to add a search form in the Magento product list view and I found the following Wiki article: http://www.magentocommerce.com/wiki/how-to/how_to_add_search_by_category_to_advanced_search This article would work 100% perfect, however the steps given in article is not really upgrade safe. There were hence two options either to include these steps in a seperate magento module, or [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to add a search form in the Magento product list view and I found the following Wiki article:</p>
<p><a href="http://www.magentocommerce.com/wiki/how-to/how_to_add_search_by_category_to_advanced_search">http://www.magentocommerce.com/wiki/how-to/how_to_add_search_by_category_to_advanced_search</a></p>
<p>This article would work 100% perfect, however the steps given in article is not really upgrade safe.</p>
<p>There were hence two options either to include these steps in a seperate magento module, or to follow the steps I have given here. <br/>This is not really a perfect practice, however, if we are not aware of writing a magento module then this can be a very quick alternative. <br/>This step also protects us from our work being over-written when we make a magento upgrade.</p>
<p><strong>Step 1: <br/></strong> Create a new folder called <strong>&#8220;Mage&#8221;</strong> inside <strong>app/code/local</strong> <br/><br/>Now we have anew folder <strong>app/code/local/Mage</strong> <br/><br/><strong>Step 2:</strong> <br/>If I see the steps given in Magento wiki, we notice that the they are extending the features of the <strong>CatalogSearch</strong> module that is located in the namespace <strong>Mage</strong>, <br/>So just go to <strong>&#8220;app/code/core/Mage&#8221;</strong> and copy the entire folder named <strong>&#8220;CatalogSearch&#8221;</strong> into <strong>app/code/local/Mage <br/><br/></strong> Now we have the entire <strong>&#8220;CatalogSearch&#8221;</strong> module located in <strong>app/code/local/Mage/CatalogSearch</strong></p>
<p><strong>Step 3: <br/></strong> Now all we need to do is follow the exact steps given in the wiki article, <strong>however make sure to edit files located in app/code/local/Mage/CatalogSearch only. <br/><br/></strong> Link to the wiki: <a href="http://www.magentocommerce.com/wiki/how-to/how_to_add_search_by_category_to_advanced_search">http://www.magentocommerce.com/wiki/how-to/how_to_add_search_by_category_to_advanced_search</a></p>
<p>How to add catalog search in Magento product list view or the Search by category feature in Magento product list view.</p>
<p>This simply involves adding a search form in prodcut list view we however need to ensure that the category id is passed to the advanced search form using a hidden input. <br/></p>
<p>Add the following code to</p>
<p>&#8220;app\design\frontend\<strong>YOURPACKAGENAME</strong>\default\template\catalog\product\list\toolbar.phtml&#8221; <br/>OR <br/>&#8220;app\design\frontend\<strong>YOURPACKAGENAME</strong>\default\template\catalog\product\list.phtml&#8221; <br/></p>
<blockquote><p>&lt;?php if( !isset($_GET['category']) ): ?&gt; <br/>&lt;form action=&#8221;&lt;?echo $this-&gt;getUrl(&#8216;catalogsearch/advanced/result&#8217;)?&gt;&#8221; method=&#8221;get&#8221; id=&#8221;category_search_form&#8221;&gt; <br/>&lt;?php <br/><br/>if ($this-&gt;helper(&#8216;catalog/data&#8217;)-&gt;getCategory()) { <br/>$_ccat = $this-&gt;helper(&#8216;catalog/data&#8217;)-&gt;getCategory(); <br/>} else { <br/>$_ccats = $this-&gt;helper(&#8216;catalog/data&#8217;)-&gt;getProduct()-&gt;getCategoryIds(); <br/>$_ccat = Mage::getModel(&#8216;catalog/category&#8217;)-&gt;load($_ccats[0]); <br/>}; <br/>$_ccatID = $_ccat-&gt;getId(); <br/>?&gt; <br/>&lt;input type=&#8221;hidden&#8221; id=&#8221;category_search_field&#8221; name=&#8221;category&#8221; value=&#8221;&lt;?php echo $_ccatID ?&gt;&#8221; /&gt; <br/>&lt;div class=&#8221;left&#8221;&gt; <br/>&lt;input name=&#8221;name&#8221; id=&#8221;searchcat&#8221; value=&#8221;&lt;?php echo $this-&gt;__(&#8216;Search Category&#8217;) ?&gt;&#8221; title=&#8221;Name&#8221; class=&#8221;input-text &#8221; type=&#8221;text&#8221; /&gt; <br/>&lt;input type=&#8221;image&#8221; alt=&#8221;&lt;?php echo $this-&gt;__(&#8216;Search&#8217;) ?&gt;&#8221; src=&#8221;&lt;?php echo $this-&gt;getSkinUrl(images/ico_s_search.png&#8217;)?&gt;&#8221; class=&#8221;cw_buttonicon&#8221; /&gt; <br/>&lt;/div&gt; <br/>&lt;/form&gt; <br/>&lt;script type=&#8221;text/javascript&#8221;&gt; <br/>//&lt;![CDATA[ <br/>var searchForm = new Varien.searchForm('category_search_form', 'searchcat', '&lt;?php echo $this-&gt;__('Search Category') ?&gt;'); <br/>searchForm.initAutocomplete('&lt;?php echo $this-&gt;helper('catalogSearch')-&gt;getSuggestUrl() ?&gt;', 'search_autocomplete'); <br/>//]]&gt; <br/>&lt;/script&gt; <br/>&lt;?php endif ?&gt;</p>
</blockquote>
<p><strong>Note:</strong> <br/><strong>1.</strong>The first if statement <strong>&lt;?php if( !isset($_GET['category']) ): ?&gt;</strong> makes sure that we will not have two forms in the advanced search result page. <br/>You should retain this if statement because when we are in advanced search we will no longer be in the previously selected category! <br/><strong><br/>2.</strong> You may need to change the path of search image.</p>
<p><strong>3.</strong> I have also included the autocomplete feature, so be careful if you are changing the name or ID attribute of the form or the input tags.</p>
<p>Hope this article would be useful, kindly do not forget to write your comments here. Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/magento/adding-search-by-category-feature-to-magento-advanced-search-and-catlog-search-in-product-list-view/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to change Base URL in Magento</title>
		<link>http://blog.chandanweb.com/magento/how-to-change-base-url-in-magento</link>
		<comments>http://blog.chandanweb.com/magento/how-to-change-base-url-in-magento#comments</comments>
		<pubDate>Wed, 29 Apr 2009 16:10:40 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Base url]]></category>
		<category><![CDATA[magento base url]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/uncategorized/how-to-change-base-url-in-magento</guid>
		<description><![CDATA[Sometimes it may be essential to change the BASE URL of Magento. (Usually when you want to make a similar copy of Magento on another server!) There are 2 – 3 simple steps involved in this: Step 1: Edit old URL values in database Table: core_config_data In this table you need to edit the field [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it may be essential to change the BASE URL of Magento.    <br />(Usually when you want to make a similar copy of Magento on another server!)</p>
<p>There are 2 – 3 simple steps involved in this:    <br /><strong>     <br />Step 1: Edit old URL values in database       <br /></strong>Table: <strong>core_config_data</strong>     <br />In this table you need to edit the field named <strong>value</strong> containing specific values in the field named <strong>path</strong>!     <br />Precisely saying you need to search for web/unsecure/base_url and web/secure/base_url and replace them with new values.     </p>
<p>Please refer the images for an example.     <br />OLD Values:     <br />&#160;<a href="http://blog.chandanweb.com/wp-content/uploads/2009/04/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.chandanweb.com/wp-content/uploads/2009/04/image-thumb3.png" width="644" height="44" /></a>     </p>
<p>New Values:     <br /><a href="http://blog.chandanweb.com/wp-content/uploads/2009/04/image4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.chandanweb.com/wp-content/uploads/2009/04/image-thumb4.png" width="644" height="62" /></a></p>
<p><strong>Step 2: Login to backend and clear Configuration cache!      <br /></strong>This might be simply not possible and hence skip to next step!     </p>
<p><strong>Step 3: Find All entries of old domain name in the cache folder and replace them one by one.      <br /></strong>Magento retains all configuration cache in /var/cache folder.     <br />This step is&#160; good for Advanced Users who can do file search and replace such strings in one shot <img src='http://blog.chandanweb.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />      <br />If you are migrating a very big site, then this step will be certainly worth.</p>
<p>I use this “Unix <strong>Find </strong>Command” very useful in searching:</p>
<blockquote><p><kbd>       <br />find . -exec grep -q <a href="http://www.magdummy.cws">www.magdummy.cws</a> '{}' \; –print         <br /></kbd><kbd>       <br /></kbd></p>
</blockquote>
<p><strong>Step 3: Now it’s time to clear the cache! (Normal User)      <br /></strong>As already specified in step2, we know that Magento retains all configuration cache in /var/cache folder.     <br />You can clear the entire contents in this cache folder. Magento regenerates all these files when needed.</p>
<p><strong>Step4: View your new site in the browser.      <br /></strong>It should now be working fine like the old one <img src='http://blog.chandanweb.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I hope this would work fine for you.    <br />Please leave your comments or I would appreciate any idea that suits best in this case.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/magento/how-to-change-base-url-in-magento/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>
