Magento Themes and Magento Extensions

Magento – How to run Query from magento root file?

Posted on November 16th, 2012 | Posted by admin

In magento some time you need to truncate some tables or you need to find some details using sql query
If you don’t have the database access credentials only ftp access then create the .php file and write some query into that which you want to execute one sample is as below

here I am truncating the table called ‘catalog_product_flat_1′

* Scan Magento local.xml file for connection information

if (file_exists('./app/etc/local.xml')) {

$xml = simplexml_load_file('./app/etc/local.xml');

Magento – Get loaded class into magento

Posted on November 14th, 2012 | Posted by admin

Magento – Get loaded class into  magento
if you are working with  .phtml  files and you want to know which class is getting loaded for this

then you can use the below codes in your .phtml file




echo Zend_Debug::dump($this);

Magento Template Advices

Posted on November 13th, 2012 | Posted by admin

A couple of days ago i’ve finished my first template for Magento. It is new e-commerce platform with a lot of features. But it takes time to learn how it is working. So here is a couple of advices for whose who will work on creating a template for Magento.

I assume that you use fresh install of Magento.

  1. To start you need to create two dirs. Basicly you can just copy them from default theme.
    • copy /app/design/frontend/default/default to /app/design/frontend/default/your_theme (contain layout and html files)
    • copy /skin/frontend/default/default to /skin/frontend/default/your_theme ( contain pics, css, js )
  2. To assign theme to a store
    • go to System -> Configuration -> Design tab
    • choose website or store-view level
    • in Current package name, enter the name of the interface in which your new theme resides ( i.e. default)
    • in Default (under Themes heading), enter the name of the new theme ( i.e. your_theme )

Can’t login to new Magento installation…

Posted on November 12th, 2012 | Posted by admin

If you find yourself unable to login to your newley-installed Magento admin area, you may want to try this:

Open the file Varien.php in a text editor. You will find the file in app > code > core > Mage > Core > Model > Session > Abstract > Varien.php.

Go to somewhere around line 75 and comment out these lines:

/* set session cookie params

Save the file and try logging in again. (This tip came off the Magento forum and has helped me more than once so I thought I’d share it!)

Magento: Create multi shipment for an order programmatically

Posted on November 11th, 2012 | Posted by admin

This is another post for Magento programmer who needs to work with an extension for creating shipment for Magento order. You will need to use this when you have a module which connects Magento store with a vendor store. Basically, you need to program a script to create shipment for Magento automatically.

First, you will need to load an order using order increment id:

$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
Page 4 of 6« First...«23456»