farbod.de Posted April 19, 2016 Share Posted April 19, 2016 hi, how i can disable right click on product images?? Link to comment Share on other sites More sharing options...
farbod.de Posted April 20, 2016 Author Share Posted April 20, 2016 ???? Link to comment Share on other sites More sharing options...
shokinro Posted April 21, 2016 Share Posted April 21, 2016 (edited) Not sure what is the purpose to disable right click. if you just want to disable the contextmenu, you can use <body oncontextmenu="return false;"> You can also try to add following code to product page theme file, document.onkeydown = keyboardDown; document.onkeyup = keyboardUp; document.oncontextmenu = function(e){ var evt = new Object({keyCode:93}); stopEvent(e); keyboardUp(evt); } function stopEvent(event){ if(event.preventDefault != undefined) event.preventDefault(); if(event.stopPropagation != undefined) event.stopPropagation(); } function keyboardDown(e){ ... } function keyboardUp(e){ ... } If you Google, you may find more and best fit your needs. Actually above script is what I googled. not tested yet, you need to try by yourself. product page theme file is located /themes/YourThemeFolder/product.tpl Edited April 21, 2016 by shokinro (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now