I set up the module and everything works except for anonymous users are unable to see the cart contents/totals on the confirm order page.
I messed around with this and have found that if i give anonymous user the permission View any order of any type. then the cart contents show up and are visible, but i think this would be a security issue and don't want a user to be able to move over to someone else's order confirmation.
Any ideas how i can make this work?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | confirm_view_own.png | 5.11 KB | jesss |
| #5 | confirm_view_any.png | 8.31 KB | jesss |
Comments
Comment #1
rszrama commentedAre you sure it wouldn't work with just "View own orders of any type?"
Comment #2
blankstar85 commentedI currently have that permission set to the anonymous user. But its not working
Comment #3
nelslynn commentedAny updates? I have the same issue.
Comment #4
rszrama commentedThe only other known reason for this would be if your View uses a product relationship and authenticated users have some higher level product viewing permissions that anonymous users don't have. This isn't really an issue with the PayPal module, so you might follow this core issue and update your View / permissions in the meantime: #2001080: Views Product relationship permissions are too strict
Comment #5
jesss commentedI don't think this is a duplicate as Views isn't involved in my use case. When an anonymous user is returned to the site to confirm their order after checking out with Paypal, the shopping cart contents are blank. View Own Orders of Any Type does not work, but if I change the permissions to View Any Order, anonymous can see their cart contents. (See attached screenshots.)
Of course, now anonymous can see the contents of any order, which is definitely a security issue so this is not a good solution.
Maybe some sort of token needs to be passed as well, similar to how webform allows anonymous users to see their own results.
Comment #6
pmelab commentedAfter digging deep through the process I found the problem. There is a new order state for
checkout_paypal_ec, but cart access is not set to true. Thats why anonymous users are able to see the cart at the start of the process (in statescartorcheckout_review) but not as soon as the paypal redirect returns and the order is set tocheckout_paypal_ec. You need to alter order statuses and enable cart visibility.Comment #7
rszrama commentedThis is not correct. That parameter doesn't affect visibility, just the shopping cart refresh. The issue here is a duplicate of the one I linked in my comment #4 above which is itself more or less a duplicate of #1276450: Views results empty for unprivileged user when using Relationship: Content: Referenced Product. My recommended solution is in #1276450-136: Views results empty for unprivileged user when using Relationship: Content: Referenced Product.
Comment #8
mr.m0dit commentedCan @pmelab or some else please tell me where to put the code in post #6?
Thank you!