How to run Magento indexer using command prompt?

Magento provides indexer process by browser base as well command prompt. To run indexer process from browser base go to admin side system configuration menu "System -> Configuration -> Index Management". To run indexer process from command prompt follow below steps. -> Open command prompt /** Go to PHP exe directory */ -> Type & press enter : cd your_drive:\wamp\bin\php\php5.2.5 /** Now use "PHP" word and indexer.php file path of your Magento set-up followed by indexing option */ --> To Reindex all indexes php your_drive/magento/setup/indexer.php --reindexall...
More

How to use magento core query for read and write?

Most of the Magento developer preferred to use module model object or model resource object for Magento query, but even though some time need to use core query. To use core query method use below code. /** Core resource object */      $resource = Mage::getSingleton('core/resource'); /** Read adapter connection */     $read= $resource->getConnection('core_read'); /** table name to fetch records */      $clientsTable = $resource->getTableName('clients'); /** Select query with where clause and order by */   &nb...
More

How to resize image in magento?

To resize image in magento use below code and pass image url as parameter in Varien_Image object. /** Varien Image object for image url */     $imageObj = new Varien_Image($imageUrl); /** Set constrain */     $imageObj->constrainOnly(true); /** Keep Image Aspect ratio */     $imageObj->keepAspectRatio(false); /** Keep Image frame */     $imageObj->keepFrame(false); /** Keep Image Transparency */     $imageObj->keepTransparency(true); /** Set image background Color */ &nbs...
More

Remove column from user list at admin side in wordpress.

To remove any column from user list at admin side in wordpress follow the bellow code.   /* Huck action to call function */ add_action('manage_users_columns','remove_user_my_column');   /* Function which is removing the username column from list*/   function remove_user_my_column($column_headers) { unset($column_headers['username']); return $column_headers; }
More

Create Layered Navigation for custom product collection

Here are the changes what you need do. 1) Created one custom module for custom page. My custom page URL was http://{magento_root}/onsale. 2) Set below Layout XML file for my custom page layout ('onsale' is my custom attribute). <onsale_index_index translate="label"> <reference name="left"> <block type="onsale/layer_view" name="customlayer" after="currency" template="catalog/layer/view.phtml"/> </reference> <reference name="content"> <block type="core/template" name="category.products" template="onsale/category/view.phtml"> <block type="onsale/pro...
More