how to customize product zoom feature in standard magento ce 1.9.2?

how to customize product zoom feature in standard magento ce 1.9.2?

September 28, 2026 · Illustrated author avatarBy Stefan Bogdanescu
how to customize product zoom feature in standard magento ce 1.9.2?

Customizing Product Zoom Feature in Magento CE 1.9.2

I understand you’re looking to customize the product zoom feature in your standard Magento CE 1.9.2 installation. Let’s dive into how you can achieve this.

Understanding the ElevateZoom Library

Magento uses the ElevateZoom library for its default zoom functionality. You’ll find this under js/elevatezoom in your theme directory (usually app/design/frontend/rwd/default/js/elevatezoom).

The main configuration options are defined near the end of the jquery.elevatezoom.js file:

$.fn.elevateZoom.options = {
        zoomActivation: "hover",
        //... other options ...
        onImageSwapComplete: $.noop,
        responsive:true,
        onComplete: $.noop,
        onZoomedImageLoaded: function() {},
        onImageSwap: $.noop
};

These are the default settings that control how the zoom works.

Attempted Customizations

You mentioned you tried modifying some of these options directly, such as lensSize and zoomWindowHeight, but saw no effect. Let’s understand why this might happen.

Why Direct Modifications Don’t Work

The issue lies in how Magento initializes the ElevateZoom plugin. It uses a function called image.elevateZoom() that applies the default options defined above, essentially overriding any customizations you make to the global $.fn.elevateZoom.options object.

This is why your changes didn’t take effect even though you modified the options parameter in image.elevatezoom().

The Correct Approach: Pass a Custom Options Object

To apply custom zoom settings, you need to create an object containing your desired configurations and pass it directly into the image.elevateZoom() function. Here’s how:

  1. In your JavaScript file (e.g., app/design/frontend/rwd/default/js/app.js), define your custom options as a variable:
var ZoomOptions = {
    lensSize: 200,
    zoomWindowHeight: 500,
    tintColour: '#ff6347',
    tintOpacity: 0.8,
    scrollZoom: true,
    // Add other desired options here
};
  1. When initializing the zoom on your product images, pass this ZoomOptions object:
$('img.product-image').elevateZoom(ZoomOptions);
  1. Ensure you’re calling this initialization function after the image has loaded (you can use jQuery’s .on('load', ...) event for this).

This approach ensures that your custom configurations are applied correctly, as they are passed directly to the ElevateZoom plugin on each individual image.

Troubleshooting

If the zoom still isn’t working as expected after making these changes:

  • Check if there are any JavaScript errors in the console.
  • Ensure you’re initializing the zoom on the correct elements (in this case, img.product-image).
  • Double-check that your custom options object is being passed correctly.

Conclusion

To successfully customize the product zoom functionality in Magento CE 1.9.2:

  • Understand how the ElevateZoom library works and where its configuration options are defined.
  • Create a separate JavaScript file (or include your code in an existing one) to define your custom options object.
  • Pass this object directly into the image.elevateZoom() function when initializing the zoom on your product images.

Remember, if you’re making significant changes or integrating third-party extensions, it may be more efficient to create a child theme and apply these modifications there. This ensures your changes are separated from the core files and won’t get overwritten during updates.

For more detailed guides on Magento theme development and customization, I recommend checking out Laravel Company’s articles on Magento 1 development.

Happy coding! If you encounter any further issues or have other questions about Magento CE 1.9.2 customizations, feel free to ask.

Remember: Always backup your files before making major modifications to prevent data loss.

Note: The version of ElevateZoom used in Magento CE 1.9.2 is outdated and may not support all the options mentioned above. You might need to upgrade or use a compatible version for some features to work correctly.

Magento 1 Catalog Database Extensions

Our network