Use “<remove name=”catalog.compare.sidebar”/>” in layout xml file
Tag Archives: Magento
Changing Magento Product Review Page Titles
Edit the function _prepareLayout in the page app/code/core/Mage/Review/Block/View.php
Change the Breadcrumb Separator Magento
Edit the file templatepagehtmlbreadcrumbs.phtml
Set default qty value into 1 magento
Product review page does not show up short description magento
<?php echo Mage::getModel(‘catalog/product’)->load($_product->getId())->getShortDescription() ?>
Fetch the categories associated with the products on listing page magento
<?php
$_productCollection=$this->getLoadedProductCollection();
foreach ($_productCollection as $product):
foreach($product->getCategoryIds() as $category):
$categoryIds[] = $category;
endforeach;
endforeach;
print_r( $categoryIds );
?>
Fetch the shipping address of a logged in user magento
<?php
$customer = Mage::getModel(‘customer/session’)->getCustomer();
foreach($customer->getAddressesCollection() as $address) $shiipingAddress[] = $address->getData();
foreach($shiipingAddress as $value) $region[]=$value[‘region_id’];
print_r($region);
?>
How to add a block to .phtml file Magento
<?php echo $this->getLayout()->createBlock(‘mymodule/myblock’)->setTemplate(‘mymodule/myblock.phtml’)->toHtml(); ?>
List all products under a given category on homepage magento
{{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” category_id=”4″ template=”catalog/product/list.phtml”}}
List all products on home page magento
{{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” template=”catalog/product/list.phtml”}}