5 replies [Last post]
Jennifer_P's picture
Offline
Joined: 01/25/2013
Juice: 12
Was this information Helpful?

I'm trying to set up Ubercart 3 on Drupal 7 to sell file downloads.

Problem Scenario: An anonymous customer checks out successfully with Paypal. They get an e-mail in their inbox saying, "Your order (order# 9) at The Drupal Site included file download(s). You may access them with the following link(s): File.pdf."

But, when the anonymous user clicks on the "File.pdf" link, they can't download the file because my website gives them an "Access Denied You are not authorized to access this page." message. In short, they can pay, but not download.

I have set the permissions for the File Download module so that both anonymous and authenticated users can download files. What is going wrong? :\ Does this have something to do with the fact that I am checking out on one computer but clicking the e-mail download link on another computer? (I'm still testing the system right now.)

Thank you in advance for the advice!

brockray's picture
Offline
Joined: 09/15/2013
Juice: 6
Did you ever figure this out?

I would really like to provide file downloads to anonymous users. I developed a workaround for first-time customers that automatically logs them in and gives a link on the checkout complete page to their download page. But that doesn't work for returning users, because I can't automatically log them in. Any suggestions?

Jennifer_P's picture
Offline
Joined: 01/25/2013
Juice: 12
Re: Did you ever figure this out?

Sorry, it's still broken for me as of October, 2013. I gave up and went with a different store platform. Came back recently hoping the bug would be fixed, but no such luck.

brockray's picture
Offline
Joined: 09/15/2013
Juice: 6
Re: Re: Did you ever figure this out?

So I actually figured out a workaround, though it took just a little bit of extra work. I added a text field to the product where I put the exact name of the file to be downloaded. Then, when a purchase is made, I load the product entity in rules and send an email with a link pointing to the file. Seems to be working perfectly, and customers never even know that a user account is created for them (let alone forcing them to login).

gripmedia's picture
Offline
Joined: 04/04/2010
Juice: 7
Maddening

NO matter what I did, even using private file permissions module, etc., this would never work. Brockray's workaround set me on the path though I could not get the entity to load as he suggested.

So I created an email rule per product with a hard URL so they could download. I cloned the file granted rule that comes with the file download module. I set it to check for a particular product. Then in the body of the message I hard-coded the URL to download.

Kludgy as heck, but best i could do.

This method negates the access control for product download. Fortunately for our store this is OK as we are a non-profit. But this will not work for a store that wants to control access, downloads, etc.

Ubercart is maddeningly frustrating at times, when seemingly the easiest thing you want to do requires hours of hoop jumping.

The file permissions to allow anonymous download simply does not work and I don't know why and I am not a novice.

bearstar's picture
Offline
Joined: 05/08/2009
Juice: 50
Change the order of the rules

The issue I was having was that UC didn't appear to be granting the download upon receipt of full payment via PayPal.

To fix this, I reordered the rules to have 'Renew purchased files' and 'Notify customer when a file is granted' to fire after all the other rules had fired. The default order was not working.

Hope this helps someone else scratching their heads about why files were not being granted.