Posts

Showing posts from May, 2016

Redirect on Observer file Magento

                $url = Mage::getUrl('checkout/onepage');                 Mage::getSingleton('core/session')->addError('Please Log In..');                 Mage::app()->getFrontController()->getResponse()->setRedirect($url);                 Mage::app()->getResponse()->sendResponse();                 exit ;

To apply the patch using SSH in Magento

Step 1: Place patches files into Magento Root directory,Upload your files into Magento root directory. It is important to place patch files directly into Magento root directory and execute it also directly in Magento root directory. $ ls -1 PATCH_SUPEE-7405_CE_1.9.2.2_v1-2016-01-20-04-35-33.sh app cron.php downloader errors favicon.ico index.php js lib mage media pkginfo robots.txt shell skin var Step 2:Run the patches $ bash ./PATCH_SUPEE-7405_CE_1.9.2.2_v1-2016-01-20-04-35-33.sh Checking if patch can be applied/reverted successfully... Patch was applied/reverted successfully. Note: If you get this error:- Hunk #1 FAILED at 695 (different line endings). 1 out of 1 hunk FAILED checking file app/code/core/Mage/Api/Model/Server/Adapter/Soap.php Hunk #1 FAILED at 208 (different line endings). Run this comand on your terminal find . -type f -exec dos2unix {} \; This will recursively look for files from the current directory and invoke dos2unix command on them and then run the patches $ ba...