Magento Themes and Magento Extensions


Posted on January 29th, 2013 | Posted by admin

Translations between languages is quite simple in Magento. For an advanced developer, who has already worked with PHP frameworks, it is not a matter to discuss, but for a beginner it may need a few words of explanation. All texts on the page that should be translated, are stored in CSV files, in /app/locale/[language] directory. The [language] part of the path is build of language code, e. g. ‘en_US’.

If you have a look at the files content, you will find that every file structure is the same, one line contains two texts: one in your default language, and one in the destination language. To use the files – also called dictionaries – they must be declared in module’s config file (config.xml). You should put this code directly inside your frontend or admin node of the config file.

The EZ-Speedy-Make me a grid for admin method

Posted on January 27th, 2013 | Posted by admin

Perhaps one of the most common requests on any Magento project is to make lists of things in the admin. The grid block supplied for this is a wonderfully versatile tool but woefully under-appreciated. Be sure to read about admin controllers before taking on this task.

Model, View & Controller

This is a going to be a demonstration of adminhtml grid capabilities so let’s not dwell on themodel part of this – We’re going to use the Mage_​Admin_​Model_​Mysql4_​User_​Collection class because it’s an existing collection for a flat table that is guaranteed to have some data in it, even on a fresh install.

A pair of blocks

Let’s get the container quickly out of the way, it’s the part of the page that shows a title, some buttons and the all important grid block. This is boring work so copy-paste the code and alter as needed.

Magento: How to merge multiple fields in a colum in Magento admin panel grid?

Posted on January 25th, 2013 | Posted by admin
Magento provides lot of inbuild functionalities. Using “protected function _prepareColumns()”
function we can create or add new column to the grid. Like:
	protected function _prepareColumns()
		$this->addColumn('first_name', array(
			'header'	=>	Mage::helper('custommodule')->__('First Name'),
			'align'		=>	'left',
			'width'		=>	'50px',
			'index'		=>	'first_name',

		$this->addColumn('last_name', array(
			'header'	=>	Mage::helper('custommodule')->__('Last Name'),
			'align'		=>	'left',
			'width'		=>	'50px',
			'index'		=>	'last_name',

magento write join on ResourceModel

Posted on January 24th, 2013 | Posted by admin

I wanted to display the shipping description in the sales order view page. And i found that after upgrading magento, the table for grid view has changed. So in order to get the shipping description i will have to make a join on the ResourceModel. Below is the code which does that.

$collection = Mage::getResourceModel(‘sales/order_grid_collection’);
$collection->join(‘order’, ‘order.entity_id=main_table.entity_id’, ‘order.shipping_description as shipping_description’);

Now you can use the “shipping_description” variable in the grid to view the description.

Magento not sending emails to gmail and hotmail

Posted on January 22nd, 2013 | Posted by admin

Magento not sending emails to gmail and hotmail

A couple of our clients had noticed a problem that just started popping up. It appeared that emails to the free accounts like gmail, aol, yahoo and hotmail were not getting to their customers inbox. It turned out those services were just dropping the emails all together and were not just going to spam folders.

A fix to this problem is actually very simple, or it at least it was for our two clients.

Navigate to System > Configuration > Advanced > System > Mail sending settings > Set return path > YES

Page 1 of 41234»