Product Image Zoom

Disabling Image save option without affecting Image Zoom mod - Product Image Zoom

Disabling Image save option without affecting Image Zoom mod

by zeeshop » Thu Dec 09, 2021 4:42 pm

Hi,

I can use a code in CSS file user.css , that can limit right-click functions on all images with

Code: Select all

img {
  pointer-events: none;
}
But this also disables the functionality of Product Image Zoom, which I want to keep on.
Please advise how code should be entered to ensure the product image zoom module can keep working while limiting save the image (or other right-click functions on image) remains disabled.

Thanks
zeeshop
Posts: 78
Joined: Sun Jan 10, 2021 11:30 pm
Contact:

Re: Disabling Image save option without affecting Image Zoom

by zipurman » Thu Dec 09, 2021 6:07 pm

As you mentioned ... you can remove mouse events from an image using CSS ... but I don't think you can remove specific events with CSS.

You could try using javascript:

Code: Select all

<script>
$(document).ready(function () {
    $(".pi-gallery img").on("contextmenu",function(e) {
        return false;
    });
});
</script>
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 473
Joined: Tue Oct 13, 2020 5:20 pm
Contact: