Hi,
I am using CS Cart community edition V3.0.2 for my downloadable product store. I have following issues with it.
We allow customer to download product 5 times after purchase. But issue is when customer purchases the product and downloads it then in customers download profile it is not showing that how much downloads remaining or how much time he/she downloaded the product already.
Please check attached screen shot.
Is there any way to show the remaning downloads like following
Total Downloaded / Allow
2 / 5
--------------------------------
Another issue is when customer purchase the product then product download URL generates. But the issue is generated URL is not secured if customer share this URL then anyone can download the file directly without login. Is there any way to restrict it, it should happen like following example
If customer “Mr. A†shares the URL to “Mr B†and if “Mr B†enters the URL in browser then downloading file should not start directly cart should ask for login details of “Mr. A†first then “Mr B†can download the file.
--------------------------------
Please give me reply as soon as possible.
Thanks for your help in advance.
Thanks
Hi there!
Limiting downloading for logged in user is not so difficult.
First of all, you have to disable anonymous checkout!
Then in the controllers/customer/orders.php find this code (maybe line 400 or 401):
if (($field == 'file_path' && !empty($_REQUEST['ekey']) || $field == 'preview_path')) {
and replace it with:
if ((isset($auth['user_id']) && $auth['user_id'] != 0 && $field == 'file_path' && !empty($_REQUEST['ekey']) || $field == 'preview_path')) {
I have tested it on my demo installation.
Regards,
Istvan
Displaying the max downloads and available downloads is a bit complicated.
You have to modify the “order_downloads” controller and view.
The database queries:
$max_downloads = db_get_field("SELECT max_downloads FROM ?:product_files WHERE file_id = ?i", $file_id));
$file_downloads = db_get_field("SELECT downloads FROM ?:product_file_ekeys WHERE ekey = ?s AND file_id = ?i", $ekey, $file_id);
I can made this modification for you. If you need, please send me a private message.
[quote name='drahos.istvan' timestamp='1348651743' post='145784']
Hi there!
Limiting downloading for logged in user is not so difficult.
First of all, you have to disable anonymous checkout!
Then in the controllers/customer/orders.php find this code (maybe line 400 or 401):
if (($field == 'file_path' && !empty($_REQUEST['ekey']) || $field == 'preview_path')) {
and replace it with:
if ((isset($auth['user_id']) && $auth['user_id'] != 0 && $field == 'file_path' && !empty($_REQUEST['ekey']) || $field == 'preview_path')) {
I have tested it on my demo installation.
Regards,
Istvan
[/quote]
Thanks… Thanks… Thanks… for the reply,
Hi
I have modified this and result is now without login URL is not working but at the same time now downloads function of the cart not working after login clicking on download button cart gives following error…
I am using CS Caer V3.0.2
-----------
Warning[color=#000000]: Cannot modify header information - headers already sent by (output started at /home/tgfonlin/public_html/tgfdigitalstore.com/controllers/customer/orders.php:1) in[/color]/public_html/domainname.com/core/fn.fs.php[color=#000000] on line [/color]297
if ((isset($auth['user_id']) && $auth['user_id'] != 0 && $field == 'file_path' && !empty($_REQUEST['ekey']) || $field == 'preview_path')) {
Hi there!
I've made a video. Check this out: - YouTube
My version is: 3.0.3 PRO, and I think it's working fine.
Regards,
Istvan
Hello drahos.istvan - thanks for the video. I am in the middle of creating a section for eBooks on a new emplementation of 3.0.3 PRO CS-Cart. Can you please provide any feedback on the objective below?
Objective:
Use the “options” field to display what TYPE of file user would like to download (ePub, .mobi or watermarked/DRM adobe pdf). After approved transaction, send only the TYPE of file the user selected in the options.
Right now I perceive our process user flow to be:
Creating Categories for Kindle Fire, Nook, Adobe Reader, then create seperate products for each. This isn't really a good solution for us, since there will be 75-100 titles.
I have the development domain set up if you would like to take a look and provide any insight or expertise, I have exhausted research in the forums, google search and user manual. I'm sure someone has crossed this bridge before, I just lack the technical programming skills to perceive the best solution at this time.
Thanks so much.
Dawn/HOPELights.