Know Magento
yet another magento blog
Tag Archives: Magento CMS
Add Manufacturer block in Magento
May 23, 2011
Posted by on To add the Manufacturer block in Magento is very easy. Just follow the steps mentioned bellow.
Create a new template file manufacturer.phtml in app/design/frontend/default/<your_template>/template/catalog/navigation/
(if you are not able to find catalog or navigation directory in template then please create them in respective order)
Put the following code in manufacturer.phtml
<ul> <?php $collection = Mage::getResourceModel('catalog/product_attribute_collection') ->addFieldToFilter('attribute_code', array('eq'=>'manufacturer')) ->addStoreLabel(Mage::app()->getStore()->getId()) ->load(); foreach($collection as $a){ $manufArray = $a->getSource()->getAllOptions(false); foreach($a->getSource()->getAllOptions(false) as $option) $manufArray[$option['value']] = $option['label']; } asort($manufArray); foreach($manufArray as $menKey => $menVal) { if(is_array($menVal)) { continue; } echo '<li><a href="'.Mage::getURL().'catalogsearch/advanced/result/?manufacturer%5B%5D='.$menKey.'">'.$menVal.'</a></li>'; } ?> </ul>
Add Featured Products on Homepage in Magento
May 17, 2011
Posted by on Adding featured products in Magento is very easy. Just follow the steps mentioned below.
- Log in to your Magento Admin end.
- Go to Catalog > Manage Categories.
- Select Root Category of your choice. By default only one Root category is available named “Root Catalog”.
- Now click on Add Subcategory button on left and name new subcategory “Featured” (this name can be anything of your choice).
- If you do not want to load category on store front-end then Is Active to No.
- If you do not want your category to be appeared in navigation set Include in Navigation Menu to No.
- After creating the category you will see the category name and ID on the page title. Note down the ID of your category which is mentioned after ID: label in Category title on page. See the image below for reference.
- Add few Products in newly created Featured category. Read more of this post