Magento 1.7 Product Frontend – Disable Cloud-Zoom Click on Product Page

frontendmagento-1.7product

I am working on eCommerce website. link: http://www.ultimatespares.com/motorcycleparts/crash-pads-screens/crash-pads-r12-for-ducati-monster-696-2014.html

I want to disabled click from magnifying glass .cloud-zoom-lens. On click new window open.

I tried to add

  1. css for that class pointer-events: none;
  2. and tried in js.

but use….I think plugin is working perfectly beacuse http://www.ultimatespares.com/motorcycleparts/crash-pads-screens.html
(click on quick view and check)

So what should i do?

Best Answer

On your host there is library

http://www.ultimatespares.com/js/ecommerceteam/cloud-zoom.1.0.2.js

It's not very clear idea but to achieve your target you need make some changes there (for example with rewrite).

If you ctrl+F word 'click' in this file you find following:

            $(this).bind('click', $(this), function (event) {
                var data = event.data.data('relOpts');
                // Destroy the previous zoom
                $('#' + data.useZoom).data('zoom').destroy();
                // Change the biglink to point to the new big image.
                $('#' + data.useZoom).attr('href', event.data.attr('href'));
                // Change the small image to point to the new small image.
                $('#' + data.useZoom + ' img').attr('src', event.data.data('relOpts').smallImage);
                // Init a new zoom with the new images.                
                $('#' + event.data.data('relOpts').useZoom).CloudZoom();
                return false;
            });

Try to remove hardly this (or part of this), to understand will it helpful or not. If yes - make an rewrite

Related Topic