Viewing 1 to 4 of 4 items
Archive | Extensions RSS feed for this section

Magento – Functions cheatsheet

General functions Function Description $this->getRequest()->getServer(‘HTTP_REFERER’); Get the referer URL Product related functions Function Description $product->getName() Get product name $product->getSku() Get product sku Mage::getModel(‘cataloginventory/stock_item’)->loadByProduct($_product)->getQty() Get product stock $product->getResource()->getAttribute(‘color’)->getFrontend()->getValue($product) Get a product attribute value (like color/size) $product->isSaleable() checks if a product is salable $product->isisAvailable() checks if a product type is salable Mage::getModel(‘catalogrule/rule’)->calcProductPriceRule($product,$product->getPrice()) Gets the product final price  Full Article…


Magento Category Collection Grid/List View

Now let start with explanation and steps. Please go through the previous blog on paging to understand this better.   Step1: IndexController In the indexcontroller of your module we will write very simple code, to just load and render the layout. 1 2 3 4 5 6 7 8 9 <?php class Excellence_Collection_IndexController extends Mage_Core_Controller_Front_Action {     public function  Full Article…