Magento Themes and Magento Extensions

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);

Securing Magento File & Directory Permissions

Posted on November 10th, 2012 | Posted by admin

By default most software packages are installed with the most lenient file/directory permissions and ownership. This is normally done for the sake of the software developer given that their software must be installed on a range of diverse systems with varying configurations. This article is meant to give you an overview of how to setup your Magento installation with the strictest of permissions for overall security’s sake.

When running Linux there are two main environments that you will find:

1) PHP scripts run via mod_php or equivalent and are executed as the webserver user. 2) PHP scripts execute as the user who owns the files themselves via an intermediate construct such as suPHP, PHP suEXEC, PHP-FPM etc.