Skip to main content

Posts

How to Remove Customer Account Dashboard Links in Magento

Please follow the below steps to remove customer account Dashboard links in Magento. Step 1:  Go to ( yourPackage/YourTemplate/customer/account/navigation.phtml ) Step 2:  Replace the below line <?php $count = count($links); ?> **With** /* Add or Remove Account Left Navigation Links Here -*/ <?php $_count = count($_links); unset($_links['account']); /* Account Info */ unset($_links['account_edit']); /* Account Info */ unset($_links['tags']); /* My Tags */ unset($_links['invitations']); /* My Invitations */ unset($_links['reviews']); /* Reviews */ unset($_links['wishlist']); /* Wishlist */ unset($_links['newsletter']); /* Newsletter */ unset($_links['orders']); /* My Orders */ unset($_links['address_book']); /* Address */ unset($_links['enterprise_customerbalance']); /* Store Credit */ unset($

Parsing Domain Name From URL In PHP

To get Domain name from the url, we can use parse_url() php function. This would filter the domain name from the given url. $domain = str_ireplace ( 'www.' , '' , parse_url ( $url , PHP_URL_HOST )); This would return the google.com for both http://google.com and http://www.google.com

Can’t able to update cart quantities after upgrade Magento

Please go through the below for making the cart quantities work in Magento. Another issue which has cropped up on a number of clients’ sites after an upgrade to Magento 1.8 is that they can’t update cart quantities any more. The functionality still appears to be there – you change product quantities and hit the “update basket” button – but it doesn’t actually do anything. If this is happening to you, the chances are that you’re using a custom template file for template/checkout/cart.phtml in your theme – with the recent upgrade a small change has been introduced to the base version of this file which, since you’re using a custom version, won’t be reflected in your page. One approach is simply to delete the cart.phtml file, which forces Magento to fall back on the base file – but if you’ve got a custom version of that file the chances are you’ve made some changes to it, which would be wiped out if you went down this route. The better approach is to add the updated lines to your own c

Enable exception printing in Magento

In order to see the exact error, you need to go to the Magento installation folder > var > report > , and check the output. In the above case the file containing the error report would be  var/report/ 2589632525 . The error log record number is different every time the error page is shown. If, however, you want to be able to see this output (called exception printing) directly in your browser, here's what you need to do: 1. Access your Magento installation folder via FTP or SSH and go to the  errors  folder. 2. Find the file called  local.xml.sample  and rename/copy it to  local.xml . Now if your Magento has any issues, the error output will be printed directly into the browser and you won't have to check the error log file every time.

Add Custom links under Account Information tab in Magento Admin

Core File path: app\code\core\Mage\Adminhtml\Block\Customer\Edit\Tab\Account.php Copy the core files to local path app\code\local\Mage\Adminhtml\Block\Customer\Edit\Tab\Account.php ///// $suffixElement = $form->getElement('suffix');         if ($suffixElement) {             $suffixOptions = $this->helper('customer')->getNameSuffixOptions($customerStoreId);             if (!empty($suffixOptions)) {                 $fieldset->removeField($suffixElement->getId());                 $suffixField = $fieldset->addField($suffixElement->getId(),                     'select',                     $suffixElement->getData(),                     $form->getElement('lastname')->getId()                 );                 $suffixField->setValues($suffixOptions);                 if ($customer->getId()) {                     $suffixField->addElementValues($customer->getSuffix());                 }      

Upgrade from Magento 1.7.0.2 to 1.9.0.1

Upgrade Roadmap for 1.9.0.1 from 1.7 1) take a backup of current database and current 1.7 code. 2) download latest magento from the  http://www.magentocommerce.com/download 3) remove all folders and files from your 1.7 code (but you should  have backup somewhere) and place all folders and files from the 1.9. 4) now from your 1.7 merge your following custom folders into the 1.9 - Community app/code/community - Local app/code/local - Media - your theme or package (app/design/frontend/default/<ur theme> or  app/design/frontend/<your package>) - custom folders from Skin (both for adminhtml and frontend). - copy your custom xml files from app/etc/modules/ to current  app/etc/modules/ - any custom admin theme folder  from adminhtml/default/yourtheme. - copy your custom folders from adminhtml/default/default/ (1.7)  to adminhtml/default/default/ (1.9). - custom js files if any from app/js/. 5) now go to app/etc/local.xml.Edit database de