Fixing target=”_blank” for W3C compliance using Javascript / jQuery

HTML 4.0 Strict and XHTML 1.0 Strict recommendations of the W3C no longer include the target attribute of the <a> tag. The Transitional versions of the specifications still include it, but by definition, these specs are on the way out. So this means you can’t use target=”_blank” for your <a> tags if you want to …

Read moreFixing target=”_blank” for W3C compliance using Javascript / jQuery

How to fix the issue: Product images missing in backend but not in the frontend

Introduction Recently I have to fix a strange issue for one of my clients. The issue was that product images were missing from ‘Images’ tab of product edit form (as depicted below), though they were displaying fine in the frontend. After going through the table relationship for catalog product images (as shown below), it was …

Read moreHow to fix the issue: Product images missing in backend but not in the frontend

500 Internal Server Error: Mismatch between target GID (XXX) and GID (XXX) of file

Today (at the time of writing) I tried to install Magento 1.7.0.0 via SSH as ‘root’ user using following bash script: #!/bin/bash wget http://www.magentocommerce.com/downloads/assets/1.7.0.0/magento-1.7.0.0.tar.gz wget http://www.magentocommerce.com/downloads/assets/1.2.0/magento-sample-data-1.2.0.tar.gz tar -zxvf magento-1.7.0.0.tar.gz tar -zxvf magento-sample-data-1.2.0.tar.gz mv magento-sample-data-1.2.0/media/* magento/media/ mv magento-sample-data-1.2.0/magento_sample_data_for_1.2.0.sql magento/data.sql mv magento/* magento/.htaccess . chmod -R o+w media mysql -u dbUserName -pdbPass dbName < data.sql chmod o+w …

Read more500 Internal Server Error: Mismatch between target GID (XXX) and GID (XXX) of file

Getting super attributes info using raw SQL in Magento

Introduction While creating a configurable product, you need to create an attribute(s) which will be used as a select option(s) for the customer(For Example Color, Size, etc.). These kinda attributes are called super attributes or configurable attributes. In this article, we will be discussing how to get different info about super attributes using raw SQL. …

Read moreGetting super attributes info using raw SQL in Magento

How to change default sort order/dir in Magento search results?

Introduction Today we will be discussing how to change the default sort order/dir in Magento search results (simple & advanced). Regarding solution, some say you need to change the /app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php file in order to change the default sort order field and dir. But you don’t need to do so as there is an extremely easy …

Read moreHow to change default sort order/dir in Magento search results?