7 replies [Last post]
strikedo's picture
Offline
Joined: 02/06/2008
Juice: 45
Was this information Helpful?

Hi all,

I have a production site live using Beta 5

I am running an exact dupe on my XAMPPLite to test further development before changing the live site.

I want to add file products and have set up a test product on my sandbox. I go through the purchase procedure and the file, mark the order complete through Admin, and the file shows up in the users File Downloads tab.

However when I click on the link to download the file I get Access Denied error.

It's generating a custom link properly:

http://localhost/mywebsite/cms/download/1/8170531d8efca6564298c593f5df8f78

However that link generates the Access Denied.

I have the product files directory outside my webroot and have placed the file there and have configured the path correctly in my Store Administration setttings. I have also set the number of downloads to 100 to avoud the null error that prevents links being generated.

Any thoughts would be most appreciated. Getting basic file product functionality working is the first step in a module I want to develop which would encrypt PDFs when downloaded. The idea is that you can tag the PDF with the user's name or email address so that once they purchase it, if they share it around, you'll be able to trace the file back to the original purchaser.

But I can't develop the module until I get the basic file product functionality to work...

Thanks,

Marco

Shawn Conn's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 916
Re: Can't download purchased file products

Is there a specific error message that is being generated? If not, it sounds like you haven't set the permissions for "download file" for user roles.

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

strikedo's picture
Offline
Joined: 02/06/2008
Juice: 45
D'oh! Thanks....

D'oh!

Thanks....

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: D'oh! Thanks....

Hmm... kinda curious if that permission is necessary. Was there a request for its inclusion? It seems like anyone who has purchased a download should have access to it, and without purchasing it I don't know how they'd ever come to a page where they might download it. Thoughts?

Shawn Conn's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 916
Re: Re: D'oh! Thanks....

It was done so that anyone who wanted to prevent anonymous downloads could do so. That's the pretty much the sole reason it was created.

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

strikedo's picture
Offline
Joined: 02/06/2008
Juice: 45
Re: Re: Re: D'oh! Thanks....

I must say I do appreciate this functionality. I want my site is set up to give file downloads to all members who pay an annual fee. Once their role expires they should no longer have access to the files. File download products by role permissions neatly achieves this.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: D'oh! Thanks....

Well, makes sense to me. Smiling

beifler's picture
Offline
Joined: 11/30/2010
Juice: 7
Include in instructions?

Hey Shawn,

Great feature - I strongly suggest a note about the permissions should be included somewhere in Ubercart, probably on the file download config page (admin/store/settings/products/edit/features). ...I had no idea this was a requirement and almost didn't find this forum before using a path inside the Drupal root to make it work.

Thanks!
Bren