Posts

Remove index.php from url in magento

If you want to remove index.php from your magento store url then please follow below steps. Like http://www.magentosite.com/index.php     to     http://www.magentosite.com Go to admin side. Go to " System => Configuration =>Web =>Search Engine Optimization ". Use Web Server Rewrites : Yes. After that clear cache and index from Magento admin side. Enjoy...

Magento Admin in Debug Mode

Just run this query: ==> INSERT INTO core_config_data (scope, scope_id, path, value) VALUES ('default', 0, 'dev/debug/template_hints', 1), ('default', 0, 'dev/debug/template_hints_blocks', 1); To disable them again, run this query ==> UPDATE core_config_data set value = 0 where scope = 'default' and scope_id = 0 and path ='dev/debug/template_hints' To enable again run this query ==> UPDATE core_config_data set value = 1 where scope = 'default' and scope_id = 0 and path ='dev/debug/template_hints'

How to call static block in frontend in magento

echo $this->getLayout()->createBlock('cms/block')->setBlockId(''Here Block Identifire'')->toHtml();

Get Product Detail by product id in Magento

$model = Mage::getModel('catalog/product'); //getting product model $_product = $model->load($pro_id); //getting product object for particular product id echo $product = $_product->getid();  //Get Product Id echo $_product->getShortDescription(); //product's short description echo $_product->getDescription(); // product's long description echo $_product->getName(); //product name echo $_product->getPrice(); //product's regular Price echo $_product->getSpecialPrice(); //product's special Price echo $_product->getProductUrl(); //product url echo $_product->getImageUrl(); //product's image url

How to call any phtml file into other phtml file in magento

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('checkout/cart.phtml')->toHtml(); ?> <?php echo $this->getLayout()->createBlock('core/template')->setTemplate('checkout/success.phtml')->toHtml(); ?>

Import Database via Command Prompt

Step 1:- copy sql file into   C:\wamp\bin\mysql\mysql5.5.8\bin   folder. Step 2:- go to cmd           C:\wamp\bin\mysql\mysql5.5.8\bin >mysql –u root –p password databasename < sqlfilename.sql -u= root ,php myadmin username -p=password , php myadmin password.