Create Downloadable Products. How Find Server Location Of Uploaded File?

Once I create a digital product and I upload a digital file (using, Files to Sell), how can I know the location of digital file in var/downloads?

Do I have to do an FTP file search?

Is there a "simple" way to know the location where file was uploaded in the var/downloads/ "tree"?

Any solutions?

I guess first thing to ask is "why" is the location needed?

Are you concerned that it is not creating an exact representation f what you uploaded?

But I believe it becomes var/downloads/[PRODUCT_ID]/[FILENAME]

I guess first thing to ask is "why" is the location needed?

Are you concerned that it is not creating an exact representation f what you uploaded?

But I believe it becomes var/downloads/[PRODUCT_ID]/[FILENAME]

The location is needed because it is the way I have worked in my store and makes for smoother work flow.

Yes, I am aware the CS-Cart default upload directory/tree path, thanks for pointing that out though.

I have noticed that the 3 things I need are located in cscart_product_files Table, and those are:

1) PRODUCT_ID (the folder created by CS-Cart)

2) FILE_PATH (name of distro file) and,

3) FILE_SIZE (obvious).

Perhaps it is also located in another table, I don't know, I'm not a programmer.

My question, is it too difficult to make an addon (so as not to alter core code) that would take this info from the table and add it to my order page?

Product ID: 123

File Path: DigitalFile.zip

File Size: 15,243771

Thanks!

BTW, using 4.8.2.sp2

No, it's not technically difficult.

You need to consider that there may be more than one file available per product hence if you have a product with multiple files, you may want to display them all.

It's probably an hour or two to implement to display on your admin orders page.

If you want it on email invoices, then for the new email editor you'd need to factor in about 3X the time as it would take to do it in the original template based emails. For example it might take 1/2 hr for the original template email invoice and 1.5-2hr to do it in the new email editor. Note that admin and customer emails are different so you'll need to factor that in when figuring out how long it's going to take to implement in email invoices.

Great idea, as I will have a few product variations, good catch.

I've sent you a message, thank you!

I have a similar problem (I think) with my first attempt at selling digital products. My product is a series of videos ranging in size from 19 MB to 67MB. The max file upload size is 8MB so I uploaded them via FTP to /var/downloads/125

Now that they're on the server, I need to add them to the list of 'Files to sell'. I'm now trying to locate these files on the server or should I be trying to determine a URL for them?

Any suggestions?

I would suggest that you create a folder in the root of your store to upload these large files to.

Then use the URL option to have it use HTTP to get those files and put them in the right place Ie.. https://yourdomain.com/my_file_folder/foo.mpg". Alternatively, you could have the files on a different server and simply upload them from there as well.

.

You'll then have confidence that all the related business rules, permissions, etc. are correct for your customers to retrieve the files after purchase.

This "method" will insulate you from any future changes that may occur to file locations.

Generally files for products are uploaded from "server" from var/files/[company_id] I believe. Personally, I think they should have made it so that any URL within the storefront can be used for uploads rather that a specific base directory. But....

You can hire someone to create a script for which will be run by cron. It will scan var/downloads/ directory and attache corresponding files to products without uploading

Thanks EZ and eComLabs. I got it working using the existing /var/downloads/125 folder and the URL option to select the file.

Next hurdle is that the product is a series of instructional videos that are copyrighted. The e-mail that goes to the customer includes a link to all those files. There's nothing stopping the buyer from passing them along to all their friends. The links remain intact in a forwarded e-mail. Is it possible to NOT include those in the e-mail?

Also, I specified a max number of downloads to 2 but the e-mail links seem to not care about that. I've opened and played the video 4+ times. Any thoughts here?

You can set them to a single download rather than unlimited. This will allow them to download the files once.

That still won't prevent them from distributing the files themselves. But if you're clear on copyright then they would be consciously breaking the law. You could use other software to ensure that when opened the first time, they are tied to a specific device. But that's outside the scope of cs-cart.

I have the downloads set to 2. I could set it to 1. The real problem though is that the video links are included in the notification e-mail. I don't want to shut off everyone's notifications for their orders. How can I get it off the e-mail?

Thanks EZ and eComLabs. I got it working using the existing /var/downloads/125 folder and the URL option to select the file.

Next hurdle is that the product is a series of instructional videos that are copyrighted. The e-mail that goes to the customer includes a link to all those files. There's nothing stopping the buyer from passing them along to all their friends. The links remain intact in a forwarded e-mail. Is it possible to NOT include those in the e-mail?

Also, I specified a max number of downloads to 2 but the e-mail links seem to not care about that. I've opened and played the video 4+ times. Any thoughts here?

I wouldn't worry about that since they can still copy the links and still distribute them. So they don't appear in the email, perhaps editing the email template that sends them?

The way I am using to locate the folder, is I locate the product, in admin end, hoover my cursor over the product and see the full URL in the bottom of the browser, including the id "...&product_id_123, maybe there is an easier way.

Would be good if one could restrict -as an option- the download to the IP that made the purchase, but then, that may bring other issues to both customer and vendor in support emails as customer may wish to download form another location.

Just my 2 cents Mr.Croquet

I have the downloads set to 2. I could set it to 1. The real problem though is that the video links are included in the notification e-mail. I don't want to shut off everyone's notifications for their orders. How can I get it off the e-mail?

Go to Design -> E-mail templates and disable the "Orders: access to downloadable products" template or correct the template to exclude links to files

Next challenge on the way to a smooth transaction with the customer.

The files on the server range from 8MB to 67MB. When I download any of them individually, via FTP, they download cleanly and open up. They are MP4 format except for one PDF user guide.

However, when I buy them and go to my downloads (as a customer), 4 of the files show as either 273 KB or 253 KB. What would cause them to corrupt when going through CS Cart? I deleted the problem files and uploaded them again but it remains the same.

Is this a known problem or does anyone know what's happening with just those 3 files?

Oops! Correction on the corrupt file's sizes. They weren't 273/253 KB, they were 273/253 bytes.