Google Chart over ssl in magento admin

Share
Posted on September 26th, 2014 | Posted by admin

Turning on ssl in magento admin pages requires extra effort.

Magento uses google chart to generate order diagrams making requests to http://chart.apis.google.com/chart.

Up until now google apis can’t use ssl, but now there is a possibility – https://chart.googleapis.com/chart. So all we have to do is to overwrite Mage_Adminhtml_Block_Dashboard_Graph class, which is responsible for charts generation.

Touching core files is a very bad practice, so we copy some files:

Magento admin backend Read Only Access Role

Share
Posted on August 23rd, 2014 | Posted by admin

Read Only Access magento admin backend admin users might come handy if you don’t want your employees to mess around with your website content.

Here is how to setup Read Only Access users:

  • create backend permission role with the name ReadOnlyAccess
  • create backend user and assign ReadOnlyAccess role to it
  • overwrite Mage_Adminhtml_Controller_Action class preDispatch function to filter denied actions:
    cp app/code/core/Mage/Adminhtml/Controller/Action.php \
    app/code/local/Mage/Adminhtml/Controller/Action.php

Magento Admin Login Not Working in Some Browsers + Solution

Share
Posted on December 6th, 2012 | Posted by admin

If you are tearing your hair out trying to figure out why you are not able to log into the Magento admin on some browsers then this might be your solution.

This solution will apply particularly if you are setting up Magento on a brand new server or VPS as you will see.

The problem is actually that the server time is wrong. The server time is used for generating cookies and the fact that the time is wrong means that cookies become invalidated immediately. Some browsers will deal with this in a less aggressive way than others and might actually let the cookie work, others will go for hard line security and will make the whole thing break.

The way to check this is to SSH into the server and check the time:

Adding customer attributes and displaying them in the Magento admin

Share
Posted on November 27th, 2012 | Posted by admin

No doubt, many a work hour has been dedicated to adding custom customer data to Magento Commerce. Magento is an extremely robust and flexible e-commerce engine, allowing you to customize products with an infinite number of attributes, but this level of customization has not been applied to configuration of customer data.

One of the most common customer attributes has to be an account number. This is especially common with wholesalers. In this post I’ll go over how I added an account number attribute to a Magento site I’m working on for my employer. The basic principles covered here should carry over to any basic customer data you want added to the Magento admin tool. I am assuming you are already familiar with building modules for Magento;

Getting Started

We have basically two objectives:

  1. Provide an input field in the Magento admin tool to add and store the account number
  2. Display the account number in the customer profile section of the admin tool

A possible third objective would be to display this data to the customer on the front end, but we’ll hold off on that part for another day.

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

Share
Posted on November 8th, 2012 | 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',
		));
  	}

But sometimes we have lot of columns for our custom module and we need to merge two columns to single column. So what we have to do?
I explain you how can we do this by programmatically: We can use ‘Renderer’ terms to combine two columns.

Page 1 of 3123»