Monthly Archives: March 2014

Magento Generate CSV Export for Custom Admin grid

Ever Seems we require to Export the CSV or XMl for the custom grid for admin we need to follow small piece of code and you are ready to get the result

In your custom grid class you need to call method “addExportType” from “Mage_Adminhtml_Block_Widget_Grid” class
Code of protected function _prepareColumns() in your Grid class:

Add the below code under _prepareColumns.

return parent::_prepareColumns();

This will generate the Export button and once that done go to controllers file and the action to call the CSV or XMl

public function exportCsvAction()
    $fileName   = 'yourfilename.csv';
    $content    = $this->getLayout()->createBlock('modulename/adminhtml_modelname_grid')
    $this->_prepareDownloadResponse($fileName, $content);
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
$this->_prepareDownloadResponse($fileName, $content, $contentType);

and once that done CSV will be generate.”Mage_Adminhtml_Block_Widget_Grid” class have other methods also for generating Excel files.

Hope this will help you

Magento Livezilla

Installing livezilla with Magento
Livezilla is a nice tool for live support. It has almost necessary features for a perfect live support system:
Installing live chat is now became easy.Live zilla support tool for live chat.It has all features
Unlimited operators and groups
Real-time visitor monitoring
Offline messages
Ratings / Feedback Form
Geo Tracking
You can find download the visiting this page. Especially, it is free. That’s best!

Today, I will show you how to install this software for Magento.
1.Go to livezilla website and download the latest version.

2. Installing the software on your computer. This is the same as you install other softwares, just click Next, Next and Next. Really easy!

3. After the installation, start livezilla admin (you can find it’s icon on your desktop).
In the opened window, select Create new Livezilla Server then click Next.

4. A new window is opened, in this step, you will setup administration account. This account will have permission to configure the live chat server, setup groups, operators later.

Fill out your name, email, password in the form, then click Next.

5. In this step, the software will require you to create the first group.fill out something and go can change afterword also

6. Now, you will need to decide to upload files directly to your webserver using FTP or extract files to local system.
If you choose to upload directly using FTP, you will be asked for FTP information, give it host, username and password.
Remember to extract files inside a folder name livezilla and this folder has to be in your Magento root folder.
I usually prefer to use the 2nd choice because I believe uploading file using another FTP client (such as livezilla) will be faster. So if you want, just extract the file to any directory in your computer. After that, using your preferred FTP client to upload files to your magento root folder.

7. After all files are uploaded to Magento root folder, you are qualified to next step. In this step, we will setup server profile.
In the Server profile name field, you can enter the name you want. Livezilla Server Url must have this format:
You can test server connection by click on Server Test.
If you pass the test, we can go to next step.

8. Now it’s time to configure database connection, fill out your database connection there.
After that, click on Create Tables.
Once tables are created successfully, click on configuration validated.
If it shows a message that your database has been validated, click Next.

The installation is completed.
You will need to setup support group and operators. Also, you will need to put the live chat icon in your page. In Livezilla server admin, you can choose user management to setup support groups and operators. You can use Link Generator / Script Generator to get icon for live chat. There are some available options. You just need to copy generated script and put in your website where you want to show the live chat icon.