Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Deny copy/paste in OSC.


lopes_andre

Recommended Posts

Posted

Hi,

 

I want to put some code in my OSC to prevent users copy/paste my product pages.

 

There are some code to do this?

 

Best Regards,

Andre.

Posted

This contribution prevents right clicks and selecting, thereby preventing the edit>copy browser function.

 

This is a small java script that you can add to your osCommerce shopping cart. Not only does it prevent visitors from being able to right click, but it prevents the Windows warning message from being displayed. That is definately more proffesional looking. The script will also block visitors from being able to highlight anything with the cursor. Most people don't realize that you can just highlight the text or picture and the use the Copy feature under the Edit menu of Internet Explorer. The third thing the script will do is prevent the automatic Windows image tool bar from being displayed when you move the cursor over a picture. That is handy if you don't want people to steal your images

 

hth

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Posted
This contribution prevents right clicks and selecting, thereby preventing the edit>copy browser function.

hth

 

Don't forget to mention that everybody finds it irritating and the ones that do want to copy your content can easily turn it off.

Treasurer MFC

Posted

I searched the internet for that and every answer I found was that disabling right click does not work (as Boxtel said), if someone wants to copy your text they will find a way. You can always copyright your text and then Google it and see if it shows up anywhere else, if it does you can then take the appropriate action.

Posted
if someone wants to copy your text they will find a way.

Especially those who are technically savy (the ones he wants to stop).

 

All it will do is annoy casual users.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

Slightly off topic here but if done properly it is not bad that others use your product descriptions. Using a copyright such as Creative Commons you can specify how others can legally use your work such as saying that any use of it or derivative of the work must be accompanied with a link back to your site. At least that way you are getting some benifit from it.

Posted
everybody finds it irritating

 

I have seen this comment before on forums, but in all of my own online shopping I have never had the need to copy and paste e-commerce site content or seen a friend having to. Could someone elaborate on what legitimate shoppers use this ability for? Just curious.

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Posted

ok,

 

I have put this javascripr in the head of product_info.php

 

<script language=JavaScript>

<!--

function clickNS4(e){

if (document.layers||document.getElementById&&!document.all){

if (e.which==2||e.which==3){

alert(message);

return false;

}

}

}

 

 

function disableselect(e){

return false

}

 

function reEnable(){

return true

}

 

//if IE4+

document.onselectstart=new Function ("return false")

 

//if NS6

if (window.sidebar){

document.onmousedown=disableselect

document.onclick=reEnable

}

 

if (document.layers){

document.captureEvents(Event.MOUSEDOWN);

document.onmousedown=clickNS4;

}

else if (document.all&&!document.getElementById){

document.onmousedown=clickIE4;

}

 

document.oncontextmenu=new Function("alert(message);return false")

 

 

 

 

 

// -->

</script>

 

It works! :D

 

Don't deny copy/paste at 100%, but make things more dificult.

 

Best Regards,

Andr?.

Posted

As to why it's irritating - I personally tend to highlight the product name, right click, hit search the web for highlighted text, and add review to the product name after I've gotten to google. There's at least one legitimate uses right off the bat. Fortunately, though, I browse the web with javascript mostly disabled for just this reason. I also don't actually use the right-click menu when I'm copying and pasting, since right-clicking takes more time than Ctrl+C, unless my cat just threw up on my keyboard again.

 

Besides, if I were going to steal product descriptions, I'd do it properly and go to view source. That way I wouldn't have to reformat it, either.

Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...