Magento How to get Child Categories by Parent Category id

One thing we will meet for sure in magento is the category. One of the task we will need to do is the listing of child categories, the subcategories. In the following example will be listed the subcategories of a category given by it’s ID. <ol> <?php $parent_category = Mage::getModel(‘catalog/category’)->load(15); $subcategories = $parent_category->getChildrenCategories(); foreach ($subcategories […]

Read More »

Magento How to check if customer is logged in or not

This is Magento default feature. In top.link you can find login or logout link.But if you want to put somewhere login/logout button then you need to check whether a user logged in or not by the code given below.<?phpif ($this->helper(‘customer’)->isLoggedIn() ) { echo ‘<a href=”<?php echo $this->getUrl(‘customer/account/login/’);?>”>Login</a>’;} else{echo ‘<a href=”<?php echo $this->getUrl(‘customer/account/logout/’);?>”>Logout</a>’; } ?>

Read More »

Magento Error: Please check for sufficient write file permissions

Of course it did not disclose what exactly it failed in the process. Anyhow — debugging indownloader/Maged/Controller.php (Maged_Controller::isWritable()), here’s a list of files and directories that need to be made writable so Magento Connect gets to work: All these folder permissions to 777 /path/to/your/magento-install (ex: public_html) /path/to/your/magento-install/downloader /path/to/your/magento-install/downloader/config.ini

Read More »

How to increase the quality of Images at category pages in magento

As default Magento has very low quality of images at catalog page. All thumbnails look very poor. Here is how we can improve/change the quality of images. It is very simple and you can make lower or higher. *(this only works after magento verion 1.4 1. Open  app/design/frontend/yourpackage/yourtheme/template/catalog/product/list.phtml 2. Search for the following line (you […]

Read More »