Usage of image preloading for color swatch operation

Color Swatch is often a requirement for Magento Stores. You can find lots of Color Swatch Extensions and tutorials on the internet. Most of them are slow in speed in terms of swatching the image. So I am sharing some tips on overcoming that. You just have to place the following code in app/design/frontend/*/*/catalog/product/view/media.phtml: <script …

Read more

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 more

How to find the current URL in Magento?

You must be wondering we can simply use: $currentUrl = Mage::helper(‘core/url’)->getCurrentUrl() or $currentUrl = Mage::getUrl(‘*/*/*’, array(‘_current’ => true)); in order to find the current URL. But it doesn’t always work as expected. Try to use the above code in a page which has some missing CSS, js, images, etc.(You can use Firebug in order to …

Read more

Clear abandoned cart items during login in Magento

You may have noticed that old cart items (abandoned) get merged with the current one when the customer tries to log in. It’s good in terms of sales but sometimes your merchant simply may not want this feature. In this case, we can easily clear the abandoned cart items and stop being merged with the …

Read more