I am recently shifted to Drupal Commerce from Ubercart ... for its logic that I am getting and liking.
I really need to implement file dowloads selling.
I tested a paypal sandbox paying process, and eveything went ok: checkout and buying process complete!
The buyed product (pdf file) is listed in the user page, but when I click to it the system say the Access to the file is denied ...
I checked the license and it is granted and active. The access permission to the files folder (in the private folder) seem to be ok.
I tested this mainly in my local web server, but my online one seems to behave the same.

Either the administrator is unable to open the uploaded pdf file, although owner of the license.
What is wrong? I have seen there are some issues still speaking about this ... with some pending pacth, but I didn't get exactly if it is still an open matter, or not.
So, which is the proper way to finalize the overall aim of this nice commerce module???

Please help!

Comments

BrendanP’s picture

Similar problem here. Guessing it's a setting somewhere but well confused as to what it may be... is there some detailed user documentation that might help?

Thanks in advance.

BrendanP’s picture

Perhaps related: http://drupal.org/node/1259328

Did the suggested and updated top the dev release "7.x-1.x-dev" for commerce_file and working 100% for me now

recrit’s picture

Status: Active » Needs review

@itamair: please test the latest dev and report back

itamair’s picture

Ok ... it seems I made every working just overriding the rule "Update the order status on checkout completion" to make it "complete" (as default it was set to "pending").
Is this correct? It seems as every thing seems working properly now ...

Thanks recrit ...

recrit’s picture

@itamair:
if you are using that checkout rule on a dev site, thats perfectly fine. However, the order usually progresses to the status of "completed" after full payment... not just checkout completion.

Your licenses are issuing now?

John Hutcherson’s picture

Update to this comment on 12-9-11: We've updated to the latest 7.x-1.x-dev, and still no progress.

We've been following this thread because we are experiencing the same problem, namely using PayPal WPS we complete the order, the user's account shows a valid license to download a pdf, but clicking the pdf file name gives an "Access denied - You are not authorized to access this page." error message. We've set the "Update order status... " to 'completed' as suggested (referenced in comment #4), but still no luck. (We're using "commerce-order" as the data selector.)

We've also tried giving complete permissions to everything under "commerce-file", resetting file permissions for the pdf's on the server, and all sorts of other experiments to resolve the issue. So far, we're dead in the water. (Our current version for this module is 7.x-1.0-beta2 not 7.x-1.x-dev. How much would this affect things?)

We have a client waiting for a resolution to this issue, so any timely help would be appreciated.

recrit’s picture

I have edited #4 above to clarify some points.. but basically there is no rule that commerce file creates that sets any order status. The rule for the licenses to be issued is defined by commerce file. This rule reacts on an order status update. If the order gets updated to a status of "completed", then the licenses are issued and marked active. Usually order status is moved to completed via a payment rule that pushes the order to completed after full balance payment.
>> If the order's status is not "completed" then the licenses did not get issued / moved to active. Edit the order and change to completed to see if that works.
>> If the license on the user's account is not over any limits and the status is NOT 'active', edit the license and change to 'active'.

The beta2 is not supported anymore, so you should be using dev which has an update for installation (meaning you have to run update.php). However, most changes from beta2 to dev have been for installing and uninstalling the module.

recrit’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

brianlp’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta3
Priority: Normal » Major
Status: Closed (fixed) » Active

I just bumped into this problem. I run all the latest versions of D7, DC and modules. I also tried the Commerce File dev version but I can't get access to the download.

I also revised and re-saved all rules. Everything works exept the download access.

Any ideas how to solve this?

Zyurelaie’s picture

oh! hey hey!
1. I downloaded the features module.
2. I imported the feature
3. I went and exported all of the rules from the pre-fabricated install and imported them into the custom built site base

TADA!!!

btw heres where I got the rules
http://www.drupalcommerce.org/node/935

brianlp’s picture

Apparently the access issue is only for the admin role. It works fine for the normal user (customer). This is because the rule "Allow download file" checks the user role and allows it for the authenicated user. I can't set this role-check to "or" (authenticated or admin). I don't know whether this is a bug or not and if yes, what module that is. No clue what status to set here.

recrit’s picture

Status: Active » Fixed

@papalapapp: see #1467796: Administrator should have access to aall files - now admin can access all files

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.