Saturday, 13 January 2018

How to Run SQL Query in Magento root

Step : 1 Fist create xyz.php file on the magento root folder structure.

Step : 2 After add  that below code in file xyz.php.

<?php

require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();

$_product = Mage::getModel('catalog/product')->load(12);

echo $_product->getID();

echo $_product->getSku();
Step : 3 Run xyz.php file in your browser for eg. http://abc.com/xyz.php

No comments:

Post a Comment

Magento Cache System Basic Concepts

The Basics – How To Use Cache In this section we will see how to use cache in our custom modules. Suppose you have a custom module and w...