Hi Roland and madmumbler,
First, thanks for the replies and help! This site and everyone helping each other to use this great free software is so cool. Second--mm--where in SW FLA are you? I live in Port Charlotte! :) But actually, I am a Detroit boy, moved to FLA to be closer to folks, and NOW I am living in Ukraine - long story but my beautiful fiancee' is here, and I fell in love with not just her but the culture here. So I split my time between FL and Ukraine.
Anyway, I want to do pretty much what Roland did. I have high-def WMV files that I want to sell, and protect them from copying using DRM (digital rights management). I found what looks to be a good 3rd-party provider of the DRM licensing, https://www.vidlock.com. They give you an account and way to encode/protect each file, then you have code that generates a button for the customer to install the license on their PC after purchase. You can give a general license for all videos (like on a subscription site where they must pay a monthly fee, the license expires after 30 days, for example) or a license for each video. I want to go the each video route, I think.
But on my site, I plan to be selling well over 200 videos, all in super HD video quality - quality so good that an unscrupulous person could copy, then even crop and re-encode the files at a lower resolution, and still have great-looking video to sell. So I plan to protect each video with its own license, and probably have that license expire after a certain time (90 days? 180? dont know yet) and offer renewal of the license to that customer for a very small fee. This protects it if the files somehow got on another site.
So what I need to do is have code that searches the order confirmation page for each video, then adds the proper button/license link for that video. So if they order video H1, J4, I9, for example, then on their order conf will also be buttons to d/l three different licenses for those videos.
In my search here, I found one person looking to do the same thing, I have contacted him and he very kindly replied that he will try and help and find the code he made for this. Below is the text of his original post here last year when he was working on it.
Again thanks, I will keep you updated, and if/when I get this working I will gladly share how to do it with anyone who needs the same kind of functionality in their cart.
Best,
Patrick
hey there...
I just wanted to bounce some ideas back and forth... let me tell you what i need to do, and if somebody could please tell me whether I'm on the right track or not...
I need to add some conditional pieces of code to the zen cart...
scenario:
somebody purchases a specific piece of software, which is available for download. I check whether this is the specified one and, if yes, run three different pieces of code: some PHP, some Javascript and some HTML stuff which triggers the Javascript.
All that is responsible for delivering a license to the computer of the client (some DRM stuff - kinda jucky, but my client has his mind set <_< )...
so my strategy was going to be as follows:
The two "places" where the code has to appear are
checkout_success
account_history
lets work with checkout_success:
as far as i understand that page gets assembled through:
/templates/mytmpl/common/tpl_header.php
modules/checkout_success/header_php.php
tpl_checkout_success_default.php
in the header_php.php I have to check whether my specific product X is in $products_array
if yes, then I set something like
Code:
$deliver_license = true;and run the PHP.
Next step, in /templates/mytmpl/common/tpl_header.php I add the Javascript portion
And finally in tpl_checkout_success_default.php I add the HTML part to the script (which displays the link only once the license has been delivered.
The same procedure would apply to the account_history part.
Oh, and ideally - to make any further addon's of products more easy - I actually centralize the search condition and the code which gets inserted.
So, does this sound like plan, or what?
Ha, but like a good one??
And, where would be a good place to add the centralized cdoe, also considering future zen-cart upgrades...
Any suggestions are greatly appreciated...
Anurag
Anuragji
Why not?
Anuragji
27th April 2006, 06:35 PM #2
Anuragji
Join Date: Apr 2005
Posts: 16
I take the silence as a yes... ;)
Anuragji
Why not?
Anuragji
6th May 2006, 08:29 AM #3
DrByte
Quote:
Next step, in /templates/mytmpl/common/tpl_header.php I add the Javascript portion
I would suggest you do this via a PHP file located at:
includes/modules/pages/checkout_success/jscript_drm.php
This will cause the PHP here to get loaded in the header only on this page. If you build in PHP intelligence around the jscript that you intend to output, you can prevent it from using it if conditions aren't met.
Otherwise your approach sounds logical.
DrByte
6th May 2006, 03:16 PM #4
Anuragji
Thats a good one...
For now I added it to checkout_success/headers_php.php
And another file I needed also to add code to modules/downloads.php
thanks for the info...
aji
Anuragji
Why not?