Sunday, 13. November 2011
Here are the quick snippet scripts for pulling out the current product, category and cms page from inside script or template files in Magento.
Get Current category
$_category = Mage::registry('current_category');
Get Current Product
$_product = Mage::registry('current_product');
Get Gurrent CMS Page
$_cmspage = Mage::registry('cms_page')
….
Thursday, 28. July 2011
In order to show all products in a category by default you can follow this approach:
1) Overwrite the Core toolbar class: Mage_Catalog_Block_Product_List_Toolbar.php
2) From the base class, copy and override the function getLimit() in your new class. (method starts around line 723)
3) In your overridden function, Look for a line:
$limit = Mage::getSingleton('catalog/session')->getLimitPage();
And replace it with
You can now clear your Magento cache in order to register your new extension and have fun testing your view all products on a category page by default!