<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkMEQnc8fyp7ImA9WhRbEkk.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085</id><updated>2012-02-03T11:23:23.977+05:30</updated><category term="PHP" /><category term="Magento" /><category term="XHTML" /><category term="Jquery" /><category term="CSS" /><category term="Database" /><category term="Javascript" /><title>Magento, Jquery,PHP</title><subtitle type="html">Magento, Jquery, CSS, Javascript, PHP, XHTML</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>115</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/MagentoJqueryphp" /><feedburner:info uri="magentojqueryphp" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CUcFQnw6eip7ImA9WhRWEEo.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-7043016764641743202</id><published>2011-12-28T17:20:00.001+05:30</published><updated>2011-12-28T17:20:13.212+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-28T17:20:13.212+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to override catalogsearch model class in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Fr2WiKzwpHXKCXaVkc0E9M8UGRE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Fr2WiKzwpHXKCXaVkc0E9M8UGRE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Fr2WiKzwpHXKCXaVkc0E9M8UGRE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Fr2WiKzwpHXKCXaVkc0E9M8UGRE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;p&gt;In magento if you wish to override some controller then definately you will get lots of site which will describe how to do that but for model class, you will have some result. So I think to share my knowledge here. I am going to override default catalog search Model of magento. For that I will create an module with name space name Mage and module name Searchby. I hope you people know how to create an module so I will show you how to override model class only&lt;/p&gt;&lt;p&gt;Go to config.xml of your custom module then write the below code to override the catalogsearch model class&lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;modules&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Mage_Searchby&amp;gt;&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;lt;version&amp;gt;0.1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Mage_Searchby&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;frontend&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;routers&amp;gt;&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;lt;searchby&amp;gt;&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;lt;use&amp;gt;standard&amp;lt;/use&amp;gt;&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;lt;args&amp;gt;&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;lt;module&amp;gt;Mage_Searchby&amp;lt;/module&amp;gt;&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;lt;frontName&amp;gt;searchby&amp;lt;/frontName&amp;gt;&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;lt;/args&amp;gt;&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;lt;/searchby&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/routers&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/frontend&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;global&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;models&amp;gt;&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;lt;catalogsearch&amp;gt;&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;lt;rewrite&amp;gt;&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;lt;layer&amp;gt;Mage_Searchby_Model_Layer&amp;lt;/layer&amp;gt;&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;lt;/rewrite&amp;gt;&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;lt;/catalogsearch&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/models&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/global&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Now create an Layer.php file inside &lt;strong&gt;yourmodulename/Model&lt;/strong&gt; then write the below code&lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;br /&gt;
class Mage_Searchby_Model_Layer extends Mage_CatalogSearch_Model_Layer&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public function prepareProductCollection($collection)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Code to be executed&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}?&amp;gt;&lt;/code&gt;&lt;/p&gt;That's all thanks&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-7043016764641743202?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/LoIYkQtgZgo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/7043016764641743202/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/12/override-catalog-search-model-class.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/7043016764641743202?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/7043016764641743202?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/LoIYkQtgZgo/override-catalog-search-model-class.html" title="How to override catalogsearch model class in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/12/override-catalog-search-model-class.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ICQn4-fip7ImA9WhRREkw.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-6917199117564128257</id><published>2011-11-25T16:42:00.002+05:30</published><updated>2011-11-25T16:42:43.056+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-25T16:42:43.056+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to add search by category in magento mini search</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/C1b0cHTJhuTDNMbPIb2_uj5OlYM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C1b0cHTJhuTDNMbPIb2_uj5OlYM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/C1b0cHTJhuTDNMbPIb2_uj5OlYM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C1b0cHTJhuTDNMbPIb2_uj5OlYM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;p&gt;There is no free extension in magento commerce which will help you to search your store with particular category. I tried from myself and able to do, I am sharing my exprerience here with.&lt;/p&gt;&lt;p&gt;First create the drop down list of all category in form.mini.phtml&lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;lt;select name=&amp;quot;category&amp;quot; id=&amp;quot;category_search_field&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;-- Any Category --&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;?php foreach ($catalog-&amp;gt;getStoreCategories() as $_category): ?&amp;gt;&lt;br /&gt;
&amp;lt;?php if($_category-&amp;gt;hasChildren()): ?&amp;gt;&lt;br /&gt;
&amp;lt;option class=&amp;quot;parent-cat&amp;quot; value=&amp;quot;&amp;lt;?php echo $_category-&amp;gt;getId(); ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $_category-&amp;gt;getName();?&amp;gt;&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;?php foreach ($_category-&amp;gt;getChildren() as $subcategory):&lt;br /&gt;
if($subcategory-&amp;gt;getIsActive()) : ?&amp;gt;&lt;br /&gt;
&amp;lt;option value=&amp;quot;&amp;lt;?php echo $subcategory-&amp;gt;getId(); ?&amp;gt;&amp;quot;&amp;lt;?php echo ($this-&amp;gt;getRequest()-&amp;gt;getQuery('category') == $subcategory-&amp;gt;getId() ? ' selected=&amp;quot;selected&amp;quot;': &amp;quot;&amp;quot;) ?&amp;gt;&amp;gt;&amp;lt;?php echo $subcategory-&amp;gt;getName(); ?&amp;gt;&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; endforeach; ?&amp;gt;&lt;br /&gt;
&amp;lt;?php elseif($_category-&amp;gt;getIsActive()): ?&amp;gt;&lt;br /&gt;
&amp;lt;option value=&amp;quot;&amp;lt;?php echo $_category-&amp;gt;getId(); ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php echo $_category-&amp;gt;getName();?&amp;gt;&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&amp;lt;?php endforeach ?&amp;gt;&lt;br /&gt;
&amp;lt;/select&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Now go to app/code/core/Mage/CatalogSearch/Helper and open the Data.php and add the below code&lt;/p&gt;&lt;p&gt;&lt;code&gt;public function getStoreCategories()&lt;br /&gt;
{&lt;br /&gt;
$helper = Mage::helper('catalog/category');&lt;br /&gt;
return $helper-&amp;gt;getStoreCategories();&lt;br /&gt;
}&lt;br /&gt;
public function getSelectedCategory()&lt;br /&gt;
{&lt;br /&gt;
$catid = (int)addslashes($_REQUEST['category']); &lt;br /&gt;
$cat=&amp;quot;&amp;quot;;&lt;br /&gt;
if($catid&amp;gt;1)&lt;br /&gt;
$cat = Mage::getModel('catalog/category')-&amp;gt;load($catid); &lt;br /&gt;
return $cat; &lt;br /&gt;
}&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Now go to app/code/core/Mage/CatalogSearch/Model and open the Layer.php&lt;/p&gt;&lt;p&gt;replace &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;em&gt;public function prepareProductCollection($collection)&lt;br /&gt;
{&lt;br /&gt;
$collection&lt;br /&gt;
-&amp;gt;addAttributeToSelect(Mage::getSingleton('catalog/config')-&amp;gt;getProductAttributes())&lt;br /&gt;
-&amp;gt;addSearchFilter(Mage::helper('catalogsearch')-&amp;gt;getQuery()-&amp;gt;getQueryText())&lt;br /&gt;
-&amp;gt;setStore(Mage::app()-&amp;gt;getStore())&lt;br /&gt;
-&amp;gt;addMinimalPrice()&lt;br /&gt;
-&amp;gt;addFinalPrice()&lt;br /&gt;
-&amp;gt;addTaxPercents()&lt;br /&gt;
-&amp;gt;addStoreFilter()&lt;br /&gt;
-&amp;gt;addUrlRewrite();&lt;br /&gt;
Mage::getSingleton('catalog/product_status')-&amp;gt;addVisibleFilterToCollection($collection);&lt;br /&gt;
Mage::getSingleton('catalog/product_visibility')-&amp;gt;addVisibleInSearchFilterToCollection($collection);&lt;br /&gt;
return $this;&lt;br /&gt;
}&lt;/em&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;with&lt;/p&gt;&lt;p&gt;&lt;code&gt;public function prepareProductCollection($collection)&lt;br /&gt;
{&lt;br /&gt;
if(Mage::helper('catalogsearch')-&amp;gt;getSelectedCategory()!=&amp;quot;&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$collection&lt;br /&gt;
-&amp;gt;addAttributeToSelect(Mage::getSingleton('catalog/config')-&amp;gt;getProductAttributes())&lt;br /&gt;
-&amp;gt;addSearchFilter(Mage::helper('catalogsearch')-&amp;gt;getQuery()-&amp;gt;getQueryText())&lt;br /&gt;
-&amp;gt;setStore(Mage::app()-&amp;gt;getStore())&lt;br /&gt;
-&amp;gt;addMinimalPrice()&lt;br /&gt;
-&amp;gt;addFinalPrice()&lt;br /&gt;
-&amp;gt;addTaxPercents()&lt;br /&gt;
-&amp;gt;addStoreFilter()&lt;br /&gt;
-&amp;gt;addCategoryFilter(Mage::helper('catalogsearch')-&amp;gt;getSelectedCategory())&lt;br /&gt;
-&amp;gt;addUrlRewrite();&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
$collection&lt;br /&gt;
-&amp;gt;addAttributeToSelect(Mage::getSingleton('catalog/config')-&amp;gt;getProductAttributes())&lt;br /&gt;
-&amp;gt;addSearchFilter(Mage::helper('catalogsearch')-&amp;gt;getQuery()-&amp;gt;getQueryText())&lt;br /&gt;
-&amp;gt;setStore(Mage::app()-&amp;gt;getStore())&lt;br /&gt;
-&amp;gt;addMinimalPrice()&lt;br /&gt;
-&amp;gt;addFinalPrice()&lt;br /&gt;
-&amp;gt;addTaxPercents()&lt;br /&gt;
-&amp;gt;addStoreFilter() &lt;br /&gt;
-&amp;gt;addUrlRewrite();&lt;br /&gt;
} &lt;br /&gt;
Mage::getSingleton('catalog/product_status')-&amp;gt;addVisibleFilterToCollection($collection);&lt;br /&gt;
Mage::getSingleton('catalog/product_visibility')-&amp;gt;addVisibleInSearchFilterToCollection($collection);&lt;/code&gt;&lt;/p&gt;&lt;p&gt;return $this;&lt;br /&gt;
}&lt;/p&gt;&lt;p&gt;save and Enjoy.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-6917199117564128257?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/QoIWE5tW9Yw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/6917199117564128257/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/11/search-by-category-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/6917199117564128257?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/6917199117564128257?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/QoIWE5tW9Yw/search-by-category-in-magento.html" title="How to add search by category in magento mini search" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/11/search-by-category-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIDR3ozfyp7ImA9WhRSFUw.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-8845201615819838238</id><published>2011-11-17T11:46:00.000+05:30</published><updated>2011-11-17T11:46:16.487+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-17T11:46:16.487+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>cache is not generating in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0EQijkGkRvKYduqOvHJ78G3mboM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0EQijkGkRvKYduqOvHJ78G3mboM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0EQijkGkRvKYduqOvHJ78G3mboM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0EQijkGkRvKYduqOvHJ78G3mboM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Magento stores cache inside the cache folder which resides under &lt;b&gt;Var&lt;/b&gt; folder of your root magento ,But if your cache folder or var folder have not correct file permisson that is 777 then magento will not be able to generate any cache. So change &lt;b&gt;Var&lt;/b&gt; folder permission to 777 , you will see the effect. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-8845201615819838238?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/3qdZkiKy5lQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/8845201615819838238/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/11/cache-is-not-generating-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8845201615819838238?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8845201615819838238?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/3qdZkiKy5lQ/cache-is-not-generating-in-magento.html" title="cache is not generating in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/11/cache-is-not-generating-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIFQ304cCp7ImA9WhRTEEo.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-5597788046998226563</id><published>2011-10-31T19:45:00.001+05:30</published><updated>2011-10-31T19:45:12.338+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-31T19:45:12.338+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How To Display Best Selling Products On Magento Store</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Pm-k5JPONFs1l0NBgXR-NMJCmlk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Pm-k5JPONFs1l0NBgXR-NMJCmlk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Pm-k5JPONFs1l0NBgXR-NMJCmlk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Pm-k5JPONFs1l0NBgXR-NMJCmlk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To promote best selling products on your site Magento use so many way to show bestseller product, One of them I am going to show. Below code will fetch the all the list of all product which have already sell.&lt;br /&gt;
&lt;/div&gt;&lt;code&gt;&amp;lt;?php&lt;br /&gt;
$_productCollection = Mage::getResourceModel('reports/product_collection')&lt;br /&gt;
-&amp;gt;addOrderedQty()&lt;br /&gt;
-&amp;gt;setOrder('ordered_qty', 'desc');&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;p&gt;This is the collection of all the product which already have sell.&lt;/p&gt;Now use foreach loop to show some number of product and it details. I wish to show only the name of the product which has sell most. And I will show on the left sidebar of the page. &lt;br /&gt;
&lt;code&gt;&amp;lt;div class="block best-seller"&amp;gt;&lt;br /&gt;
&amp;lt;div class="right-title-bg"&amp;gt;&amp;lt;h3&amp;gt;Best Selling Product&amp;lt;/h3&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class="block-content"&amp;gt;&lt;br /&gt;
&amp;lt;ul class="best-selling-item"&amp;gt;&lt;br /&gt;
$count = 0;&lt;br /&gt;
foreach($_productCollection as $product):&lt;br /&gt;
$id = $product-&amp;gt;getId();&lt;br /&gt;
$prod = Mage::getModel('catalog/product')-&amp;gt;load($id);?&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href="&amp;lt;?php echo $prod-&amp;gt;getProductUrl();?&amp;gt;" title="&amp;lt;?php echo $prod-&amp;gt;getName();?&amp;gt;"&amp;gt;&amp;lt;?php echo $prod-&amp;gt;getName();?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$count++ ;&lt;br /&gt;
if($count==$totalPerPage)&lt;br /&gt;
break;&lt;br /&gt;
endforeach;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;p&gt;If you wish to show all the details of the product then you also can do that as you will get the product Id from $prod-&amp;gt;getId(); and from product Id you can fetch each and every details of the product&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-5597788046998226563?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/AK_jwZlnTYY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/5597788046998226563/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/10/best-seller-products-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/5597788046998226563?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/5597788046998226563?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/AK_jwZlnTYY/best-seller-products-in-magento.html" title="How To Display Best Selling Products On Magento Store" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/10/best-seller-products-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUMQHo8fCp7ImA9WhdaGEQ.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-5547064978126176905</id><published>2011-10-29T18:47:00.001+05:30</published><updated>2011-10-29T18:48:01.474+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-29T18:48:01.474+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to print product collection query in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YBeQ8G02ReOwI8pkcOFo7LtcfuE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YBeQ8G02ReOwI8pkcOFo7LtcfuE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YBeQ8G02ReOwI8pkcOFo7LtcfuE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YBeQ8G02ReOwI8pkcOFo7LtcfuE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;p&gt;Let you have write a product collection with some attribute to select some product, but you are not getting proper result then you must need to print the sql query to see whether you have write the correct syntax in magento default collection. then write the below code to get the sql query .&lt;br /&gt;
&lt;/p&gt;&lt;code&gt;&amp;lt;?php    &lt;br /&gt;
$productcollection = Mage::getModel('catalog/product')-&gt;getCollection()&lt;br /&gt;
-&gt;addAttributeToFilter('bestseller', array('eq' =&gt; 1))&lt;br /&gt;
-&gt;addAttributeToSelect('*');&lt;br /&gt;
echo $productcollection-&gt;getSelect()-&gt;assemble();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-5547064978126176905?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/Jg_P2S_34Uw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/5547064978126176905/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/10/print-product-collection-query-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/5547064978126176905?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/5547064978126176905?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/Jg_P2S_34Uw/print-product-collection-query-in.html" title="How to print product collection query in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/10/print-product-collection-query-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUERXg6fyp7ImA9WhdUEUw.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-634318634235502883</id><published>2011-09-27T15:20:00.004+05:30</published><updated>2011-09-27T15:23:24.617+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-27T15:23:24.617+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to delete all sales order in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/O7QJCtXleVcd4eNR4uv9iO3k-6k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O7QJCtXleVcd4eNR4uv9iO3k-6k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/O7QJCtXleVcd4eNR4uv9iO3k-6k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O7QJCtXleVcd4eNR4uv9iO3k-6k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;p&gt;In &lt;a href="http://www.magentocommerce.com/magento-connect"&gt;Magento Connect&lt;/a&gt; you will find some extension which will delete all cancel order and Pending Order, But it never delete all processed order. To delete all orders following code snippet can be used.&lt;/p&gt;&lt;code&gt;&amp;lt;?php&lt;br /&gt;
require 'app/Mage.php';&lt;br /&gt;
Mage::app('admin')-&amp;gt;setUseSessionInUrl(false); &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; &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;
$sales_orders = Mage::getModel('sales/order')-&amp;gt;getCollection()-&amp;gt;getData();&lt;br /&gt;
foreach($sales_orders as $sales_order){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $id = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $id = $sales_order['increment_id'];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; try{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mage::getModel('sales/order')-&amp;gt;loadByIncrementId($id)-&amp;gt;delete();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo "order #".$id." is removed".PHP_EOL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }catch(Exception $e){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo "order #".$id." could not be remvoved: ".$e-&amp;gt;getMessage().PHP_EOL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
echo "complete."&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-634318634235502883?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/eXV455Wvidw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/634318634235502883/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/09/delete-all-sales-order-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/634318634235502883?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/634318634235502883?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/eXV455Wvidw/delete-all-sales-order-in-magento.html" title="How to delete all sales order in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/09/delete-all-sales-order-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIBSH46fCp7ImA9WhdUEEw.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-8258981174040773037</id><published>2011-09-26T11:42:00.001+05:30</published><updated>2011-09-26T11:42:39.014+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-26T11:42:39.014+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to use or mysql condition in $collection data of magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MlBjm0SGfkv1QvZrf2hl-Y85-Xg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MlBjm0SGfkv1QvZrf2hl-Y85-Xg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MlBjm0SGfkv1QvZrf2hl-Y85-Xg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MlBjm0SGfkv1QvZrf2hl-Y85-Xg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Magento provide&amp;nbsp; addAttributeToFilter to use and operator in $collection, But using of OR operator is little bit different . I was guess that there must be and OrAttributeToFilter , But I was wrong I think magento forgot to write this function, Lastly I found the solution to use mysql OR in magento . In addAttributeToFilter  we have to write the condition in the form of array.&lt;br /&gt;
&lt;code&gt;protected function _prepareCollection()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$collection = Mage::getModel('catalog/product')-&amp;gt;getCollection();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$collection-&amp;gt;addAttributeToFilter(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; array(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;array('attribute'=&amp;gt;'category_ids','finset'=&amp;gt;2),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;array('attribute'=&amp;gt;'category_ids','finset'=&amp;gt;3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp;);&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;use your own attribute name and value to get the data&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-8258981174040773037?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/wbZvKl5ELgA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/8258981174040773037/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/09/use-or-condition-in-magento-collection.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8258981174040773037?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8258981174040773037?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/wbZvKl5ELgA/use-or-condition-in-magento-collection.html" title="How to use or mysql condition in $collection data of magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/09/use-or-condition-in-magento-collection.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYBQHk4cCp7ImA9WhdVEUU.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-1884250716116197230</id><published>2011-09-16T19:55:00.001+05:30</published><updated>2011-09-16T19:55:51.738+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-16T19:55:51.738+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to upload and read csv file in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/n74tuqOcXCiV8QUVxuNXRJ7mUyI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/n74tuqOcXCiV8QUVxuNXRJ7mUyI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/n74tuqOcXCiV8QUVxuNXRJ7mUyI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/n74tuqOcXCiV8QUVxuNXRJ7mUyI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To upload CSV file and to read that file line by line , Please write the below code in magento&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
if(isset($_FILES['import_file']['name']) &amp;amp;&amp;amp; $_FILES['import_file']['name'] != '')&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $uploaderFile = new Varien_File_Uploader('import_file');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $uploaderFile-&amp;gt;setAllowedExtensions(array());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $uploaderFile-&amp;gt;setAllowRenameFiles(false);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $uploaderFile-&amp;gt;setFilesDispersion(false);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $uploaderFilepath = Mage::getBaseDir('media') . DS . 'importcsv' . DS ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $uploaderFile-&amp;gt;save($uploaderFilepath, $_FILES['import_file']['name'] );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $file = &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$_FILES['import_file']['name'];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $filepath = $uploaderFilepath.$file;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $i = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(($handle = fopen("$filepath", "r")) !== FALSE) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(($data = fgetcsv($handle, 1000, ",")) !== FALSE){ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if($i&amp;gt;0 &amp;amp;&amp;amp; count($data)&amp;gt;1){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updateData($data);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; $i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mage::getSingleton('adminhtml/session')-&amp;gt;addError("There is some Error");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_redirect('*/*/index');&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; function updateData($data)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Write your code here and Update it to magento tables&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-1884250716116197230?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/jQzxlsIjIRY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/1884250716116197230/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/09/upload-and-read-csv-file-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/1884250716116197230?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/1884250716116197230?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/jQzxlsIjIRY/upload-and-read-csv-file-in-magento.html" title="How to upload and read csv file in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/09/upload-and-read-csv-file-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QHRns_fCp7ImA9WhdXFkU.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-8830413819819042390</id><published>2011-08-30T12:53:00.006+05:30</published><updated>2011-08-30T12:58:57.544+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-30T12:58:57.544+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to get contact us email address in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4g2CJaavFS6LYwB2u5bxKmRkaTM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4g2CJaavFS6LYwB2u5bxKmRkaTM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4g2CJaavFS6LYwB2u5bxKmRkaTM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4g2CJaavFS6LYwB2u5bxKmRkaTM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Here’s the code to get Contacts email:&lt;/p&gt;
&lt;code&gt;
&amp;lt;?php echo Mage::getStoreConfig('contacts/email/recipient_email');?&amp;gt;
&lt;/code&gt;
&lt;p&gt;Or you can change it from &lt;b&gt;admin&lt;/b&gt; -&amp;gt; &lt;b&gt;System&lt;/b&gt;-&amp;gt; &lt;b&gt;Configuration&lt;/b&gt;. From the left tab select Contacts then On the right side you will see Email Options Tab. From that tab you can see there is a field for send Emails To.Change th evalue to your require email address&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-8830413819819042390?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/VqoWWNJpCxk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/8830413819819042390/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/08/get-contacts-email-address-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8830413819819042390?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8830413819819042390?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/VqoWWNJpCxk/get-contacts-email-address-in-magento.html" title="How to get contact us email address in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/08/get-contacts-email-address-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YMQ3w7cCp7ImA9WhdRFEs.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-8441267040892513878</id><published>2011-08-04T19:58:00.009+05:30</published><updated>2011-08-04T20:16:22.208+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-04T20:16:22.208+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Jquery" /><title>How to uncheck Radio button by jquery</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IdrYRmeQIVCUUhtbR5vtslbD1g4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IdrYRmeQIVCUUhtbR5vtslbD1g4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/IdrYRmeQIVCUUhtbR5vtslbD1g4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IdrYRmeQIVCUUhtbR5vtslbD1g4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;script type="text/javascript"&gt;
    $(document).ready(function(){
       $("#btn").click(function(){           
           $('input[name="rd"][type="radio"]:checked').each(function(){               
                $(this).attr("checked", false);                   
            });            
       });         
    });
&lt;/script&gt;
&lt;form action="" name="aa" method="post"&gt;
        &lt;input type="radio" name="rd" value="1"/&gt;
        &lt;input type="radio" name="rd" value="2"/&gt;
        &lt;input type="radio" name="rd" value="3"/&gt;
        &lt;input type="button" id="btn" value="&amp;nbsp; Click here to Uncheck &amp;nbsp;" /&gt;
&lt;/form&gt;
&lt;h3&gt;Write the Below code to Unchecked Radio Button by Jquery&lt;/h3&gt;

&lt;p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
    $(document).ready(function(){
        $(&amp;quot;#btn&amp;quot;).click(function(){ 
           $('input[name=&amp;quot;rd&amp;quot;][type=&amp;quot;radio&amp;quot;]:checked').each(function(){ 
               $(this).attr(&amp;quot;checked&amp;quot;, false); 
            }); 
        });
    });
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;form action=&amp;quot;&amp;quot; name=&amp;quot;aa&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;
    &amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;rd&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;
    &amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;rd&amp;quot; value=&amp;quot;2&amp;quot;/&amp;gt;
    &amp;lt;input type=&amp;quot;radio&amp;quot; name=&amp;quot;rd&amp;quot; value=&amp;quot;3&amp;quot;/&amp;gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; id=&amp;quot;btn&amp;quot; value=&amp;quot;Click&amp;quot; /&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-8441267040892513878?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/hiUXcPnqzfk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/8441267040892513878/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/08/how-to-uncheck-radio-button-by-jquery.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8441267040892513878?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8441267040892513878?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/hiUXcPnqzfk/how-to-uncheck-radio-button-by-jquery.html" title="How to uncheck Radio button by jquery" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/08/how-to-uncheck-radio-button-by-jquery.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EESH0yeyp7ImA9WhdRFEs.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-3101845967480477537</id><published>2011-08-04T19:38:00.004+05:30</published><updated>2011-08-04T20:23:29.393+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-04T20:23:29.393+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to change value and fetch value of Minimum Order Amounts of free shipping in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rMOUIDhmRgLEJXlSA8DdQjMQ8ZQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rMOUIDhmRgLEJXlSA8DdQjMQ8ZQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rMOUIDhmRgLEJXlSA8DdQjMQ8ZQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rMOUIDhmRgLEJXlSA8DdQjMQ8ZQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;
    First of all to make Minimum Order Amounts of Free Shipping to &lt;strong&gt;[STORE VIEW]&lt;/strong&gt; instead of &lt;strong&gt;[WEBSITE]&lt;/strong&gt; then Go to &lt;strong&gt;app-&amp;gt;code-&amp;gt;core-&amp;gt;Mage-&amp;gt;Shipping-&amp;gt;etc-&amp;gt;System.xml&lt;/strong&gt;
    &lt;br/&gt;
    then change the value of &lt;strong&gt;&amp;lt;show_in_store&amp;gt;&lt;/strong&gt; to &lt;strong&gt;1&lt;/strong&gt; under &lt;strong&gt;carriers -&amp;gt; groups -&amp;gt; freeshipping -&amp;gt;free_shipping_subtotal&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;Now to fetch the value of the Minimum Order Amount according to store view write the below code&lt;/p&gt;
&lt;code&gt;
    &amp;lt;?php echo Mage::getStoreConfig('carriers/freeshipping/free_shipping_subtotal'); ?&amp;gt
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-3101845967480477537?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/x-wEIk0F9xk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/3101845967480477537/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/08/minimum-price-free-shipping-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/3101845967480477537?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/3101845967480477537?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/x-wEIk0F9xk/minimum-price-free-shipping-in-magento.html" title="How to change value and fetch value of Minimum Order Amounts of free shipping in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/08/minimum-price-free-shipping-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUBQ3k7fCp7ImA9WhdSGUQ.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-218271974490702601</id><published>2011-07-30T07:33:00.005+05:30</published><updated>2011-07-30T07:47:32.704+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-30T07:47:32.704+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to remove validation on zip code in magento checkout page</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2ijZZXzWsehZeWALUK4VY6Ts6DQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2ijZZXzWsehZeWALUK4VY6Ts6DQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2ijZZXzWsehZeWALUK4VY6Ts6DQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2ijZZXzWsehZeWALUK4VY6Ts6DQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;
In the World some of the country has no zip code like Ireland, But magento has default zip code validation to make that optional for specific country magento has added a new feature in admin panel. To make Zip code optional please follow the following steps.&lt;/p&gt;
&lt;p&gt; Login to your your magento admin panel then go to System -&amp;gt; Configuration-&amp;gt;General. From Country option tab you can see there is an option &amp;quot; &lt;em&gt;Postal code is optional for the following countries&lt;/em&gt; &amp;quot; Select the country which you want to Optional/Not validate . then click on save config to save your settings. To be more clear on this please see the below screenshot.
&lt;/p&gt;

&lt;img src="http://1.bp.blogspot.com/-UT-W5o59RfY/TjNpGRZOmfI/AAAAAAAAAW4/JGwg_m2g6qk/s1600/zip-code-optional.gif" border="0" alt="" width="580" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-218271974490702601?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/YvAy11X0yvo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/218271974490702601/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/07/remove-validation-on-zip-code-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/218271974490702601?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/218271974490702601?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/YvAy11X0yvo/remove-validation-on-zip-code-in.html" title="How to remove validation on zip code in magento checkout page" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-UT-W5o59RfY/TjNpGRZOmfI/AAAAAAAAAW4/JGwg_m2g6qk/s72-c/zip-code-optional.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/07/remove-validation-on-zip-code-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8ESXY6cCp7ImA9WhdTGEU.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-7065865769170211202</id><published>2011-07-17T11:46:00.006+05:30</published><updated>2011-07-17T11:53:28.818+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-17T11:53:28.818+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to change default quantity on Magento Product Page</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x4Z0h4Xgus-1i7b3w9a_3Gh0OAs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x4Z0h4Xgus-1i7b3w9a_3Gh0OAs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/x4Z0h4Xgus-1i7b3w9a_3Gh0OAs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x4Z0h4Xgus-1i7b3w9a_3Gh0OAs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;By default magento shows zero in the place of quantity text field in product details page, if you wish to change then just login to your admin panel go to &lt;b&gt;System-&amp;gt;Configuration-&amp;gt;Catalog-&amp;gt;inventory&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;There, add your minimal quantity from &lt;b&gt;Minimum Qty Allowed in Shopping Cart&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;See the below screenshot to make it more clear&lt;/p&gt;

&lt;img src="http://4.bp.blogspot.com/-vaeUW0LHu8s/TiJ_a31wwTI/AAAAAAAAAWw/-6icGEXA-8Y/s1600/change-minimum-quanity.gif" border="0" alt="" width="500" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-7065865769170211202?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/qGtTMfxWPE4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/7065865769170211202/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/07/change-default-quantity-on-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/7065865769170211202?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/7065865769170211202?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/qGtTMfxWPE4/change-default-quantity-on-magento.html" title="How to change default quantity on Magento Product Page" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-vaeUW0LHu8s/TiJ_a31wwTI/AAAAAAAAAWw/-6icGEXA-8Y/s72-c/change-minimum-quanity.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/07/change-default-quantity-on-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QERXg9fyp7ImA9WhZbEkw.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-8032170175333924147</id><published>2011-06-16T15:40:00.004+05:30</published><updated>2011-06-16T15:45:04.667+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-16T15:45:04.667+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><title>How to change css padding property using javascript dynamically</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qKQkRJN9mMg6hHOOCyJCXeFtQdI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qKQkRJN9mMg6hHOOCyJCXeFtQdI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qKQkRJN9mMg6hHOOCyJCXeFtQdI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qKQkRJN9mMg6hHOOCyJCXeFtQdI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;
Using Javascript we can change css value. Here I have written how to change the value of padding top, padding bottom, padding left, padding right differently.
&lt;code&gt;
var ab = 20;&lt;br /&gt;
//To change Padding-top value write
document.getElementById(&amp;quot;div_Id&amp;quot;).style.paddingTop =  ab.toString()+&amp;quot;px&amp;quot;
//To change Padding-left value write
document.getElementById(&amp;quot;div_Id&amp;quot;).style.paddingLeft =  ab.toString()+&amp;quot;px&amp;quot;
//To change Padding-right value write
document.getElementById(&amp;quot;div_Id&amp;quot;).style.paddingRight =  ab.toString()+&amp;quot;px&amp;quot;
//To change Padding-bottom value write
document.getElementById(&amp;quot;div_Id&amp;quot;).style.paddingBottom =  ab.toString()+&amp;quot;px&amp;quot;
&lt;/code&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-8032170175333924147?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/s0U0QthR-EQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/8032170175333924147/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/06/change-css-padding-property-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8032170175333924147?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8032170175333924147?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/s0U0QthR-EQ/change-css-padding-property-using.html" title="How to change css padding property using javascript dynamically" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/06/change-css-padding-property-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIGR3wzeip7ImA9WhZWFkk.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-481590828880599284</id><published>2011-05-17T19:20:00.004+05:30</published><updated>2011-05-17T19:25:26.282+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-17T19:25:26.282+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to send Email in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dBDOHAQxHh9obK1uoeEcjSywe58/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dBDOHAQxHh9obK1uoeEcjSywe58/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dBDOHAQxHh9obK1uoeEcjSywe58/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dBDOHAQxHh9obK1uoeEcjSywe58/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Any body can send mail using php mail() function.But in magento all the functionality has wriiten you need to just send argument inside those functions. See the following code to send mail using magento function&lt;/p&gt;

&lt;code&gt;&amp;lt;?php &lt;br&gt;
  $mail = Mage::getModel('core/email');&lt;br&gt;
  $mail-&amp;gt;setToName('Your Name');&lt;br&gt;
  $mail-&amp;gt;setToEmail('Youe Email');&lt;br&gt;
  $mail-&amp;gt;setBody('Mail Text / Mail Content');&lt;br&gt;
  $mail-&amp;gt;setSubject('Mail Subject');&lt;br&gt;
  $mail-&amp;gt;setFromEmail('Sender Mail Id');&lt;br&gt;
  $mail-&amp;gt;setFromName(&amp;quot;Msg to Show on Subject&amp;quot;);&lt;br&gt;
  $mail-&amp;gt;setType('html');// YOu can use Html or text as Mail format&lt;br/&gt;&lt;br/&gt;
  try {&lt;br&gt;
  $mail-&amp;gt;send();&lt;br&gt;
  Mage::getSingleton('core/session')-&amp;gt;addSuccess('Your request has been sent');&lt;br&gt;
  $this-&amp;gt;_redirect('');&lt;br&gt;
  }&lt;br&gt;
  catch (Exception $e) {&lt;br&gt;
  Mage::getSingleton('core/session')-&amp;gt;addError('Unable to send.');&lt;br&gt;
  $this-&amp;gt;_redirect('');&lt;br&gt;
  }&lt;br&gt;
  ?&amp;gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-481590828880599284?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/0jJGqosyMrc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/481590828880599284/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/05/how-to-send-mail-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/481590828880599284?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/481590828880599284?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/0jJGqosyMrc/how-to-send-mail-in-magento.html" title="How to send Email in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/05/how-to-send-mail-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYNRns-eCp7ImA9WhZWFk4.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-9213987750454514718</id><published>2011-05-17T16:31:00.001+05:30</published><updated>2011-05-17T16:33:17.550+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-17T16:33:17.550+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to get all list of country in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uU38W2ae59E5g3PZ5MxDqApTJ1M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uU38W2ae59E5g3PZ5MxDqApTJ1M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uU38W2ae59E5g3PZ5MxDqApTJ1M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uU38W2ae59E5g3PZ5MxDqApTJ1M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Write the following code to any phtml file or template file you will get list of all the Country&lt;/p&gt;
&lt;code&gt;
&amp;lt;select name=&amp;quot;country&amp;quot; id=&amp;quot;country&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php $country_list = Mage::getResourceModel('directory/country_collection')&lt;br /&gt;
-&amp;gt;loadData()&lt;br /&gt;
-&amp;gt;toOptionArray(false) ?&amp;gt;&lt;br /&gt;
&amp;lt;?php if (count($country_list) &amp;gt; 0){ ?&amp;gt;&lt;br /&gt;
&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;Please Select&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;?php foreach($country_list as $country){ ?&amp;gt;&lt;br /&gt;
&amp;lt;option value=&amp;quot;&amp;lt;?php echo $country['value'] ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php echo $country['label'] ?&amp;gt;&lt;br /&gt;
&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;?php } ?&amp;gt;&lt;br /&gt;
&amp;lt;?php }?&amp;gt;&lt;br /&gt;
&amp;lt;/select&amp;gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-9213987750454514718?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/KCwTmfIN0c4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/9213987750454514718/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/05/list-of-all-countries-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/9213987750454514718?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/9213987750454514718?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/KCwTmfIN0c4/list-of-all-countries-in-magento.html" title="How to get all list of country in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/05/list-of-all-countries-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMAQ3gzfCp7ImA9WhZWFkw.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-9067174637740624452</id><published>2011-05-17T12:04:00.002+05:30</published><updated>2011-05-17T12:10:42.684+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-17T12:10:42.684+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to get category or subcategory postioned by the admin panel in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/L3T2M6DPBHMI_D7VffHB4hGhGHA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L3T2M6DPBHMI_D7VffHB4hGhGHA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/L3T2M6DPBHMI_D7VffHB4hGhGHA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L3T2M6DPBHMI_D7VffHB4hGhGHA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;When  we load a category it shows his subcategory according to the product id. If you wish to show category according to the order which you have in you admin panel then you have to fetch your category with little bit different style.See the below code in which I have fetched all subcategory with proper order&lt;/p&gt;
&lt;code&gt;

&amp;lt;?php &lt;br /&gt;
$obj= new Mage_Catalog_Block_Navigation();&lt;br /&gt;
$category = $obj-&amp;gt;getStoreCategories();&lt;br /&gt;
foreach($category as $_category)&lt;br /&gt;
{&lt;br /&gt;
$catid = $_category-&amp;gt;getId();&lt;br /&gt;
$parentCategory = Mage::getModel('catalog/category')-&amp;gt;load($catid);&lt;br /&gt;
$childrenIdArray = explode(',',$parentCategory-&amp;gt;getChildren());&lt;br /&gt;
if ($key = array_search($parentCategory-&amp;gt;getId(),$childrenIdArray)) {&lt;br /&gt;
unset($childrenIdArray[$key]);&lt;br /&gt;
} &lt;br /&gt;
$collection = Mage::getModel('catalog/category')-&amp;gt;getCollection()&lt;br /&gt;
-&amp;gt;addAttributeToFilter('entity_id', array('in' =&amp;gt; $childrenIdArray))&lt;br /&gt;
-&amp;gt;addAttributeToSelect('*'); &lt;br /&gt;
&lt;br /&gt;
$sortedcategory = $collection-&amp;gt;addOrderField('position')-&amp;gt;getData(); &lt;br /&gt;
foreach($sortedcategory as $sorted)&lt;br /&gt;
{&lt;br /&gt;
$_subcat = Mage::getModel('catalog/category')-&amp;gt;load($sorted['entity_id']);&lt;br /&gt;
$subcatname = $_subcat-&amp;gt;getName();&lt;br /&gt;
echo &amp;quot;&amp;lt;h3&amp;gt;&amp;quot;.$subcatname.&amp;quot;&amp;lt;/h3&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-9067174637740624452?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/ql5id6a3KSI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/9067174637740624452/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/05/get-category-subcategory-by-order.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/9067174637740624452?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/9067174637740624452?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/ql5id6a3KSI/get-category-subcategory-by-order.html" title="How to get category or subcategory postioned by the admin panel in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/05/get-category-subcategory-by-order.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEFQXY4cSp7ImA9WhZXGU8.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-3938731145974364272</id><published>2011-05-04T17:21:00.003+05:30</published><updated>2011-05-09T12:00:10.839+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-09T12:00:10.839+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to get all gallery image with resize of a product in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rsfIQ2vgMRf1ExtRAt2tLoKadyg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rsfIQ2vgMRf1ExtRAt2tLoKadyg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rsfIQ2vgMRf1ExtRAt2tLoKadyg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rsfIQ2vgMRf1ExtRAt2tLoKadyg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In product page you can get gallery image of the current product, But if you think to fetch all gallery image of a product in other page like cms page, then you have to write the code with little bit modification. The code should looks like below&lt;/p&gt;
&lt;code&gt;
&amp;lt;?php &lt;br&gt;
$obj = new Mage_Catalog_Block_Product_View_Media();&lt;br&gt;
$_product = new Mage_Catalog_Model_Product();&lt;br&gt;
// Load all product information of a particular product&lt;br&gt;
$Products_one = Mage::getModel('catalog/product')-&amp;gt;load($id);&lt;br&gt;
// Use your Product Id instead of $id
&lt;br&gt;
$countt = count($Products_one-&amp;gt;getMediaGalleryImages());&lt;br&gt;
if($countt&amp;gt;0){&lt;br&gt;
foreach ($Products_one-&amp;gt;getMediaGalleryImages() as $_image)&lt;br&gt;
{&lt;br&gt;
// For the Original Image 
&lt;br&gt;
 echo &amp;quot;&amp;lt;img src=&amp;quot;.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).str_replace(Mage::getBaseUrl('media'),&amp;quot;&amp;quot;,$_image-&amp;gt;url).&amp;quot; alt='' /&amp;gt;&amp;quot;;&lt;br&gt;
 //For gallery Image&lt;br&gt;
 $resizeimage = $obj-&amp;gt;helper('catalog/image')-&amp;gt;init($_product, 'thumbnail', $_image-&amp;gt;getFile())-&amp;gt;backgroundColor(242,242,243)-&amp;gt;resize(400,300);&lt;br&gt;
 echo &amp;quot;&amp;lt;img src=&amp;quot;.$resizeimage.&amp;quot;alt='' /&amp;gt;&amp;quot;;
 &lt;br&gt;
}
&lt;br&gt;
} &lt;/code&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-3938731145974364272?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/VtRcHiXehSM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/3938731145974364272/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/05/get-all-gallery-image-of-product.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/3938731145974364272?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/3938731145974364272?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/VtRcHiXehSM/get-all-gallery-image-of-product.html" title="How to get all gallery image with resize of a product in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/05/get-all-gallery-image-of-product.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkACRHc5fCp7ImA9WhZXFE0.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-683957194437390301</id><published>2011-05-03T10:55:00.004+05:30</published><updated>2011-05-03T11:02:45.924+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-03T11:02:45.924+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CSS" /><title>CSS Hack for Google Chrome and Safari</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_tjdPEBXDQNsxgOAAfxaRNUc-Ms/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_tjdPEBXDQNsxgOAAfxaRNUc-Ms/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_tjdPEBXDQNsxgOAAfxaRNUc-Ms/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_tjdPEBXDQNsxgOAAfxaRNUc-Ms/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you are developing any site or designing any website, having design problem in chrome and safari you can write the below css, It only works on Google chrome and Safari  Browser&lt;/p&gt;
&lt;code&gt;
@media screen and (-webkit-min-device-pixel-ratio:0)&lt;br/&gt; {&lt;br/&gt;
.classname{ background:#ccc; } /*It will works on Google chrome and safari */&lt;br/&gt;
}&lt;br/&gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-683957194437390301?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/sexS0tptESc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/683957194437390301/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/05/css-hack-for-google-chrome-and-safari.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/683957194437390301?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/683957194437390301?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/sexS0tptESc/css-hack-for-google-chrome-and-safari.html" title="CSS Hack for Google Chrome and Safari" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/05/css-hack-for-google-chrome-and-safari.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYMQH0_fyp7ImA9WhZQGUQ.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-906595661883033174</id><published>2011-04-28T17:31:00.002+05:30</published><updated>2011-04-28T17:33:01.347+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-28T17:33:01.347+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to upload file in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-UneZSe-dvmk64fRd3F8vYVQqto/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-UneZSe-dvmk64fRd3F8vYVQqto/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-UneZSe-dvmk64fRd3F8vYVQqto/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-UneZSe-dvmk64fRd3F8vYVQqto/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; If you are making your custom module in magento and if you unable to use default magento file upload then you can use magento custom file uploading code to upload file. &lt;/p&gt;
&lt;code&gt;
// If you want to upload files under media folder &lt;br/&gt;
$absolute_path = Mage::getBaseDir('media') . DS ; &lt;br/&gt;
$relative_path = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); &lt;br/&gt;
// File Upload  &lt;br/&gt;
$files = $_FILES['file_upload']['name']; &lt;br/&gt;
if(isset($files) &amp;&amp; $files != '') &lt;br/&gt;
{ &lt;br/&gt;
    try &lt;br/&gt;
    { &lt;br/&gt;
        if(file_exists($absolute_path.DS.$files)) &lt;br/&gt;
        { &lt;br/&gt;
            $var = rand(0,99); &lt;br/&gt;
            $files = $var.'_'.$files; &lt;br/&gt;
        } &lt;br/&gt;
        // Starting upload    &lt;br/&gt;    
        $uploader = new Varien_File_Uploader('file_upload');  &lt;br/&gt;
        // Any extention would work &lt;br/&gt;
        $uploader-&gt;setAllowedExtensions(array('jpg','jpeg','gif','png')); &lt;br/&gt;
        $uploader-&gt;setAllowRenameFiles(false);   &lt;br/&gt;
        //false -&gt; get the file directly in the specified folder &lt;br/&gt;
        //true -&gt; get the file in the product like folders  /media/catalog/product/file.gif &lt;br/&gt;
        $uploader-&gt;setFilesDispersion(false); &lt;br/&gt;
        //We set media as the upload dir &lt;br/&gt;
        $uploader-&gt;save($absolute_path, $files);   &lt;br/&gt;
    }  &lt;br/&gt;         
    catch(Exception $e) &lt;br/&gt;
    { &lt;br/&gt;
        Mage::getSingleton('adminhtml/session')-&gt;addError($e-&gt;getMessage()); &lt;br/&gt;
    } &lt;br/&gt;
    // Your uploaded file Url will be &lt;br/&gt;
    echo $file_url = $relative_path.$files; &lt;br/&gt;
}   &lt;br/&gt;  
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-906595661883033174?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/OzI8eTT4nhk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/906595661883033174/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/04/upload-file-in-magento-how-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/906595661883033174?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/906595661883033174?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/OzI8eTT4nhk/upload-file-in-magento-how-to.html" title="How to upload file in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/04/upload-file-in-magento-how-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUFQHk_cCp7ImA9WhZQGUU.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-3548340856806538582</id><published>2011-04-28T15:50:00.003+05:30</published><updated>2011-04-28T15:53:31.748+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-28T15:53:31.748+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to fetch all associative product of a configurable product in magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5desK0oKLZPWyA15bWu8f_bINbg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5desK0oKLZPWyA15bWu8f_bINbg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5desK0oKLZPWyA15bWu8f_bINbg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5desK0oKLZPWyA15bWu8f_bINbg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Configurable product is the product which is created by some Associated product, If you have an configurable product and you want to get list of all associated product and it's attribute then just write the below&lt;/p&gt;
You must have your configurable product Id, My configurable product Id is 11
&lt;code&gt;
$id=11; //Use your Configurable product Id&lt;br /&gt;
$_product = new Mage_Catalog_Model_Product();&lt;br /&gt;
$childIds = Mage::getModel('catalog/product_type_configurable')-&amp;gt;getChildrenIds($id);&lt;br /&gt;
foreach($childIds[0] as $key=&amp;gt;$val)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$associatedProduct = Mage::getModel('catalog/product') -&amp;gt;load($val);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo $associatedProduct -&gt;getName();&lt;br /&gt;
//Let you have a color attribute in each associated product then you can fetch by&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$colorids[] = $associatedProduct -&gt;getColor();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$colorname[] = $associatedProduct -&gt;getAttributeText('color');&lt;br /&gt;
} &lt;br /&gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-3548340856806538582?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/3CfuRU9MjnY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/3548340856806538582/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/04/fetch-associative-product-of.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/3548340856806538582?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/3548340856806538582?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/3CfuRU9MjnY/fetch-associative-product-of.html" title="How to fetch all associative product of a configurable product in magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/04/fetch-associative-product-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAEQ3YyeSp7ImA9WhZQGUo.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-917850731196328564</id><published>2011-04-28T12:19:00.005+05:30</published><updated>2011-04-28T12:25:02.891+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-28T12:25:02.891+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to and where to change default product image in Magento</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/t69FYeaAy2PQRLDWg9ij_IusjLU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/t69FYeaAy2PQRLDWg9ij_IusjLU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/t69FYeaAy2PQRLDWg9ij_IusjLU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/t69FYeaAy2PQRLDWg9ij_IusjLU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you forgot to upload any product image then Magento always show a default image,If you think to change default image then login to admin panel then goto &lt;strong&gt;System&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Configuration&lt;/strong&gt; then click on &lt;strong&gt;Catalog&lt;/strong&gt; tab. From &lt;strong&gt;Product Image Placeholders&lt;/strong&gt; change your &lt;strong&gt;Base Image&lt;/strong&gt; , &lt;strong&gt;Small Image&lt;/strong&gt; and &lt;strong&gt;Thumbnail&lt;/strong&gt; . Now click on Save Config button to make changes.&lt;/p&gt;
&lt;br/&gt;
&lt;img  src="http://2.bp.blogspot.com/-adH61d0HnIE/TbkOWwEnqOI/AAAAAAAAAWk/G0EcZsDuLzk/s1600/change-default-magento-image.gif" border="0" alt="" width="600" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-917850731196328564?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/qsCQunMqdLU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/917850731196328564/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/04/change-default-product-image-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/917850731196328564?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/917850731196328564?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/qsCQunMqdLU/change-default-product-image-in-magento.html" title="How to and where to change default product image in Magento" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-adH61d0HnIE/TbkOWwEnqOI/AAAAAAAAAWk/G0EcZsDuLzk/s72-c/change-default-magento-image.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/04/change-default-product-image-in-magento.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UNQ3gyeip7ImA9WhZQEko.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-8780793590609508550</id><published>2011-04-20T11:09:00.007+05:30</published><updated>2011-04-20T11:31:32.692+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-20T11:31:32.692+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Jquery" /><title>How to Add option to select box by jquery</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rQO5ofIciT5P0JK3gKbyqRCJ5SY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rQO5ofIciT5P0JK3gKbyqRCJ5SY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rQO5ofIciT5P0JK3gKbyqRCJ5SY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rQO5ofIciT5P0JK3gKbyqRCJ5SY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;script type="text/javascript"&gt;
function addoption()
{
 var optionn = document.getElementById("addoption").value;
 if(optionn==""){ optionn="blank"}
 $('#selectbox').append($("&lt;option&gt;&lt;/option&gt;").attr("value",optionn).text(optionn)); 
}
&lt;/script&gt;
&lt;p&gt;I have write the below code to add option to select drop down by jquery. Add value to the below input box then click on add button.You can see the effect.That option will be added to the below selectbox&lt;/p&gt;
&lt;input type="text" height="30px" value="" id="addoption" style="padding-left: 2px; height: 20px; width: 24px;"&gt; &lt;input type="button" value="Click to Add Option" onclick="addoption()" /&gt;
&lt;select id="selectbox"&gt;
 &lt;option value=""&gt;New option will add below this&lt;/option&gt;
&lt;/select&gt;

&lt;p&gt;The code you need to write is&lt;/p&gt;
&lt;code&gt;
$('#selectbox').append($(&amp;quot;&amp;lt;option&amp;gt;&amp;lt;/option&amp;gt;&amp;quot;).attr(&amp;quot;value&amp;quot;,option_value).text(text_to_display));
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-8780793590609508550?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/31CTdd9AjLA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/8780793590609508550/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/04/add-option-to-select-box-by-jquery.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8780793590609508550?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/8780793590609508550?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/31CTdd9AjLA/add-option-to-select-box-by-jquery.html" title="How to Add option to select box by jquery" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/04/add-option-to-select-box-by-jquery.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYNQ3YycSp7ImA9WhZSFks.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-3462880621520134551</id><published>2011-04-01T17:36:00.004+05:30</published><updated>2011-04-01T17:46:32.899+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-01T17:46:32.899+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How to add new order status in magento admin panel</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gHBc1VtddJl5eG7S-OX5-itefZs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gHBc1VtddJl5eG7S-OX5-itefZs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gHBc1VtddJl5eG7S-OX5-itefZs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gHBc1VtddJl5eG7S-OX5-itefZs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;To add New Status in magento admin panel, you need to write your own custom module , then in your config.xml file write the below code to add new Status&lt;/p&gt;
&lt;code&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;    &amp;lt;global&amp;gt;&lt;br /&gt;        &amp;lt;sales&amp;gt;&lt;br /&gt;            &amp;lt;order&amp;gt;&lt;br /&gt;                &amp;lt;statuses&amp;gt;&lt;br /&gt;                    &amp;lt;custom_status translate=&amp;quot;label&amp;quot;&amp;gt;&amp;lt;label&amp;gt;&amp;lt;![CDATA[Custom Status]]&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/custom_status&amp;gt;&lt;br /&gt;                &amp;lt;/statuses&amp;gt;&lt;br /&gt;                &amp;lt;states&amp;gt;&lt;br /&gt;                    &amp;lt;new&amp;gt;&amp;lt;!-- order state where you want to assign your custom status e.g:- New, Onhold, Canceld etc--&amp;gt;&lt;br /&gt;                        &amp;lt;statuses&amp;gt;&lt;br /&gt;                            &amp;lt;custom_status/&amp;gt;&lt;br /&gt;                        &amp;lt;/statuses&amp;gt;&lt;br /&gt;                    &amp;lt;/new&amp;gt;&lt;br /&gt;                &amp;lt;/states&amp;gt;&lt;br /&gt;            &amp;lt;/order&amp;gt;&lt;br /&gt;        &amp;lt;/sales&amp;gt;&lt;br /&gt;    &amp;lt;/global&amp;gt;&lt;br /&gt;&amp;lt;/config&amp;gt;
&lt;/code&gt;

&lt;p&gt;It will work upto 1.4.2 , But in Magento 1.5.0 or above there is Special Option to do this. To make own Custom status above magento 1.5 version go to System-&amp;gt;Order Statuses. Then Click on Create New Status. After creating new status click on Assign Status to State to assign that status &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-3462880621520134551?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/JmFAH1biIhg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/3462880621520134551/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/04/add-new-order-status-in-magento-admin.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/3462880621520134551?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/3462880621520134551?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/JmFAH1biIhg/add-new-order-status-in-magento-admin.html" title="How to add new order status in magento admin panel" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/04/add-new-order-status-in-magento-admin.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IHR34yeip7ImA9WhZSE0w.&quot;"><id>tag:blogger.com,1999:blog-7808083316589260085.post-93714412115733510</id><published>2011-03-28T16:35:00.005+05:30</published><updated>2011-03-28T16:55:36.092+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-28T16:55:36.092+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Magento" /><title>How To Create a custom url redirect in Magento using URL Rewrite Management</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RKCoaFr0NAYnN3eACEPmd2nY72U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RKCoaFr0NAYnN3eACEPmd2nY72U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RKCoaFr0NAYnN3eACEPmd2nY72U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RKCoaFr0NAYnN3eACEPmd2nY72U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;To make magento more SEO friendly, It needs to redirect to a custom url, By default magento have this feature but if you have created any module whose url like modulename/id/3, then you needs to redirect it to a SEO friendly url. To redirect the url to a "301 Permanent redirect" you just login to your admin panel, then go to -&amp;gt; &lt;span style="font-weight:bold;"&gt;Catalog -&amp;gt; URL Rewrite Management&lt;/span&gt;, from the drop down select Custom ,follow the below screenshot to make it more easy.&lt;/p&gt;
&lt;p&gt;
1) In the Id path give your current url (e.g: review/product/list/id/14/category/3) &lt;br/&gt;
2) In Request Path write same as Id path (e.g: review/product/list/id/14/category/3)&lt;br/&gt;
3) In Target Path give oyu custom Url with domain name (e.g:- http://www.mysite.com/mobile.html)&lt;br/&gt;
&lt;br/&gt;
&lt;img src="http://3.bp.blogspot.com/-cQwhmFtwGQc/TZBtqGEAd-I/AAAAAAAAAWM/lLWbjZ21mjI/s1600/Url-rewrite.png" border="0" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7808083316589260085-93714412115733510?l=xhtmlandcsshelp.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MagentoJqueryphp/~4/pxQfL4fSpg8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://xhtmlandcsshelp.blogspot.com/feeds/93714412115733510/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://xhtmlandcsshelp.blogspot.com/2011/03/url-rewrite-management-in-magento.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/93714412115733510?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7808083316589260085/posts/default/93714412115733510?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/MagentoJqueryphp/~3/pxQfL4fSpg8/url-rewrite-management-in-magento.html" title="How To Create a custom url redirect in Magento using URL Rewrite Management" /><author><name>Anjan</name><uri>http://www.blogger.com/profile/00622300376257624773</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_FlryVc7_5yA/S5EfxYgHw1I/AAAAAAAAALA/T34NmaMJgNk/S220/Image0746.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-cQwhmFtwGQc/TZBtqGEAd-I/AAAAAAAAAWM/lLWbjZ21mjI/s72-c/Url-rewrite.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://xhtmlandcsshelp.blogspot.com/2011/03/url-rewrite-management-in-magento.html</feedburner:origLink></entry></feed>

