Open popup in admin view using window.js

Freedom Infomatrix

Your Button code should look something like this

Make sure you have window.js/default.css/magento.css added in page on which you are opening this popup

If not then add this like below in your custom layout update xml

dsvmaileditor will be define in js code

On above button onclick open first  parameter should be ajax URL which return HTML and second is id anything i don’t know where it is used but it should be in parameter.

Now just add below JS code in your page.

My controller action just return phtml file html something like this

You can open these dialog using window.js

Dialog Module
– confirm
– alert
– info
– setInfoMessage
– closeInfo

I have used

you can use as per your requirement.

For more info you can visit this site

Window JS Reference

View original post


Import large mysql database using mysql command prompt

Freedom Infomatrix

Click your wamp server icon then look for MYSQL > MSQL Console then run it.

If you dont have password, just hit enter and type :

mysql> use database_name;
mysql> source location_of_your_file;
If you have password, you will promt to enter a password. Enter you password first then type:

mysql> use database_name;
mysql> source location_of_your_file;
location_of_your_file should look like C:/mydb.sql

for desktop my location is like :: C:/Users/Zaheer/Desktop/db.sql/db.sql
so the command is mysql>source C:/Users/Zaheer/Desktop/db.sql/db.sql;

This kind of importing sql dump is very helpful for BIG SQL FILE.

I copied my file mydb.sq to directory C: .It should be capital C: in order to run

and that’s it.

View original post

Custom Sending emails in magento

you can put this script in controller or any event of user


$email_to = '';

$receiveName = 'xyz';

$vars = data of user

$template_id = "New email"; //Name of email template
$email_template = Mage::getModel('core/email_template')->loadByCode($template_id);  //load templa

$email_template->send($email_to,$receiveName, $vars);