Magento: Google Analytics not working after Magento upgrade to version 1.7

Problem:- I recently upgraded a Magento shop from version 1.6 to 1.7 and suddenly the Google Analytics stopped tracking data. Solution:- You need to add ‘template’ attribute to googleanlytics block in app/design/frontend/your_package/your_theme/layout/googleanalytics.xml Note:- If you are using the default Magento design then your_package = default or base your_theme = default Here is the edited googleanalytics.xml … Read more

Magento: Get Customer Attribute

This article contains code snippet to get customer attributes in Magento. Get Customer Collection $collection = Mage::getResourceModel('customer/customer_collection'); Get Customer’s Name in Customer Collection $collection = Mage::getResourceModel('customer/customer_collection') ->addNameToSelect(); Get Custom Attribute in Customer Collection $collection = Mage::getResourceModel('customer/customer_collection') ->addAttributeToFilter('your_attribute_code', array('notnull' => true)); Thanks.

Magento: Get Custom Option Value from Order

This article contains code snippet to get custom options value of all products in any Magento order. Suppose, there is a product with a custom option dropdown list. You chose one of the option from the dropdown list and purchased that product. The code below fetches product’s custom option value selected in any particular order. … Read more

Ubuntu: Creating Custom Shortcut Keys

Shortcut Keys are always very useful for any work. There are many built-in shortcut keys in Ubuntu Linux. Moreover, you can add your own shortcut keys according to your needs and desire. Here is the step-by-step guide to create custom shortcut keys on Ubuntu. I am using the Unity Desktop in Ubuntu. Ubuntu version 12.10. … Read more

Ubuntu Linux: Convert CHM file into PDF file

CHM (Microsoft Compiled HTML Help) is a Microsoft proprietary online help format, that consists of a collection of HTML pages and an index. CHM files are not recognized by Linux and they cannot be open using any default application. To open CHM files, you have to install CHM viewer in Linux. In my previous article, … Read more

Ubuntu Linux: How to view CHM file?

CHM (Microsoft Compiled HTML Help) is a Microsoft proprietary online help format, that consists of a collection of HTML pages and an index. CHM files are not recognized by Linux and they cannot be open using any default application. To open CHM files, you have to install CHM viewer (like xCHM) in Linux. You can … Read more

Magento: TinyMCE not displayed / Shows error

I was working with a custom Magento module. I had to display TinyMCE editor in an admin form field. I was getting this error when I try to add/edit data from the custom module:- Warning: Invalid argument supplied for foreach() in lib\Varien\Data\Form\Element\Editor.php on line 225 I tried some workaround and was able to see the … Read more

Ubuntu: Add Remove Applications & Software Source Repository

Here are some ubuntu linux commands to add and remove repository/software sources and applications. Add application sudo apt-get install {package-name} Eg: Adding skype-wrapper application sudo apt-get install skype-wrapper Remove application sudo apt-get remove {package-name} Eg. Removing skype-wrapper application sudo apt-get remove skype-wrapper Eg. Removing application package called skype-wrapper along with all configuration files sudo apt-get … Read more