Recently we had been come across where we had to migrate Magento 1.9 to Magento 1.9, I had been little skeptic on how migration would work. After some R&D we found out some basic directions on how to do it, our first attempt of migration was totally failed and then we started doing it again from scratch and below are the steps for Magento Migration(upgrade) 1.7 to 1.9 and common issues and its resolutions
- Prepare and do analysis report on what core file modification has been done. you need to keep this report handy it would need in later stage of migration. This plays very important role, there are few sites which can prepare this report for you)
- Identify a local environment where you would perform this migration
- Download latest code of production environment to local environment.
- Export Database SQL file from production enviroment
- Unzip your code to your local htdocs(as i was using XAMP)
- Import your database SQL file to mysql local enviorment
- Change base url of your site in database to point to local host url
- Change local.xml to point to local database configuration
- Go to magento backend and disable SSL in General->Web->Unsecure section
- Use SSL on front end to false
- Use SSL on admin to false
- Disable/Uninstall all your extensions/plugins and note it down, you might have to install all plugins again after migration(also check your extension is supported in Magento 1.9, if not you need to find some alternate plugins)
- Verify your application is running fine on your local environment.(note down any issue you found and make sure it is logical issues)
- Download magento 1.9 from magento website.(http://www.magentocommerce.com/download)
- Now go to your local Magento 1.7 code folder and delete everything(make sure you keep backup somewhere, we would need it in sometime)
- Copy your local.xml file from 1.7 code folder to htdocs/your1.7site/etc/
- Now comes the tricky part of merging files.
- Copy your community folder from 1.7 code folder(app\code\community) to 1.9(app\code\community)
- Copy your local folder from 1. 7 code folder(app\code\local) to 1.9(app\code\local)
- Copy your media folder 1.7 code (app\media) to 1.9(app\media)
- Copy your theme folder from 1.7 code to 1.9app\design\frontend\default/yourtheme to app\design\frontend\default\
- Copy your theme’s skin frontend folder from 1.7 code to 1.9 — skin\frontend\default\yourtheme to skin\frontend\default\
- Copy your theme’s skin adminhtml folder from 1.7 to 1.9 —skin\adminhtml\default\default\yourtheme to skin\adminhtml\default\default
- If you have any custom admin theme folder, copy it to 1.9 app\design\adminhtml\default\yourtheme
- Copy your custom js file if any from 1.7 to 1.9 – app\js\yourfolder to app\js
- Copy your custom module if any from 1.7 to 1.9 — app\etc\modules\yourmodule to app\etc\modules
Now take a deep breath and drinks some fluid and browse your url. if you have not made any modification to core files in 1.7 and you are lucky enough you would be able to browse your site. Go ahead and test your functionality.
Next steps in migration is to fix the issues which you encounter during your testing, if some core functionality is broken, go through your report which tells you which core files has been modified and compare both files(using winmerge or any comparison tool) and make your best decision and merge the code manually. You might have to do this process back and forth for quite sometime to make everything right(yes we did that). Though for everyone’s reference I am listing down some common errors which everybody faced after migration and how to fix this.
- Checkout Progress Panel is missing or empty.
Fix – You need to compare your checkout.xml file from 1.7 theme and 1.9 base default, we compared below 2 files and there were few blocks missing in theme checkout file. Again this will depend on case by base. Refer to this link , many of us have faced similar issue and you will get your solution
- On selecting Shipping method clicking on continue it does not take you to next section(payment method selection)
Make sure that this file in your theme checkout/onepage/payment/info.phtml has the following content:
<dl class="sp-methods" id="checkout-payment-method-load"> <!-- Content dynamically loaded. Content from the methods.phtml is loaded during the ajax call --> </dl>
- Order was not submitting on clicking of Place Order button
Step 1 Go to /app/design/frontend/base/default/template/checkout/onepage/payment.phtml
Find below code,
<fieldset> <?php echo $this->getChildHtml('methods') ?> </fieldset> Replace it with <fieldset id="checkout-payment-method-load"> <?php echo $this->getChildHtml('methods') ?> </fieldset>
- Not able to login to front end from login page.
Go to below file
Find below code
<ul class="form-list"> <li>
Add below line
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
- Login Issue from Checkout Page(on clicking login on checkout page and submitting correct information redirects you to create account and login page)
Go to /app/design/frontend/default/lightjunction/template/checkout/onepage/review/info.phtml
Find below line
review = new Review(‘<?php echo $this->getUrl(‘checkout/onepage/saveOrder’) ?>’, ‘<?php echo $this->getUrl(‘checkout/onepage/success’) ?>’, $(‘checkout-agreements’));
Replace it with
review = new Review(‘<?php echo $this->getUrl(‘checkout/onepage/saveOrder’, array(‘form_key’ => Mage::getSingleton(‘core/session’)->getFormKey())) ?>’, ‘<?php echo $this->getUrl(‘checkout/onepage/success’) ?>’, $(‘checkout-agreements’));
- On clicking checkout page for Already registered customer login redirects to create an account or login page
Go to billing.phtml file & add this code under login form.
<input type=”hidden” name=”form_key” value=”<? echo Mage::getSingleton(‘core/session’)->getFormKey(); ?>” />
- Magento Update shopping cart quantity issue
Go to yourtemplate/template/checkout/cart.phtml and under :-
<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>” method="post">
add the following code inside the <form> field :-
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>” />
If you are facing any other issue, check out other forums surely you won’t be alone and you would get some help,please feel free to add in comment if any issue and its resolution after migration,will add it here.
Hope this helps….Happy Coding!!!!