Hello,
I'm wondering if anonymous checkout is possible.
When I try an anonymous order everything is working perfectly (order is generated, pdf is generated), however the PDF is not getting attached to the email via the "Send the PDF with barcode" rule. I don't get any email at all, or one with no attachment if I set it to "Send the email even if the order has no tickets".
I thought it was because of the private file system storage, but I still get nothing if I set anonymous to be able to see private files (which I'd rather not do anyway).
Thanks,
•• matt
Comments
Comment #1
pjcdawkins commentedIt isn't yet, so I'm converting this to 'Feature request'.
Comment #2
pjcdawkins commentedFor the OP (mattlt):
There is no access check in the email code - if any valid tickets exist for the order, they will be attached. The reason why the PDF is not attached is more likely that the ticket(s) are not considered 'valid', for whatever reason.
Comment #3
pjcdawkins commentedAt the moment I don't think this is due to missing functionality - let me know if you still can't get this working
Comment #4
mattltHi Patrick,
We're going to test out the most recent changes you made the last couple days and see if we can get it working. We'll definitely keep you update.
Thanks for the update and for the module!
•• matt
Comment #5
miechiel commentedHi,
We recently started a website including this module which had the same issue as described in this issue.
I found that the drupal_mail() function also seems to check if the attachment on the mail to this user can be accessed.
I fixed this by adding the file to the mail as raw data. Attached is my patch that did the trick..
Comment #6
pjcdawkins commentedThat patch might be a good idea, thanks @miechiel. I'll test it when I can.
Comment #7
pjcdawkins commentedI think #5 is good
Comment #8
alfthecat commentedThe patch from #5 works, thanks!
On the ticket "anonymous" gets printed for the customer name instead of the usersname when anonymous users are allowed to checkout, but accounts are created in the process.
I think it would be great if the chosen username could be used.
Comment #9
pjcdawkins commented@AlfTheCat
I don't really know anything about anonymous checkout but that doesn't seem like a commerce_event_ticket problem.
So if the order's UID is set properly, the customer name will be correct. Surely, if there is an anonymous checkout system, the order UID should be set correctly with a customer name?
Comment #10
alfthecat commentedHi pjcdawkins,
Today the tickets are no longer being emailed at all... I've spent hours now trying to figure out why.
There's noting in the watchdog or apache log. UID1 and anonymous are just not getting emails with tickets. Other emails from the site do work.
Do you have any suggestions on what to do?
Thanks a bunch!
Comment #11
miechiel commented@AlfTheCat
Are these new tickets available via the admin interface (admin/commerce/tickets ) and downloadable?
If Yes.
Did you already checked the folder where the pdf are generated are they readable for drupal?
Comment #12
alfthecat commentedHi Miechiel,
Yes to all, the tickets are available via the admin interface, they're validated. The PDF's are accessible, at least to authenticated users (I can view and download them in my browser) but I've also made sure anonymous users have the permission to view their own private files, as do authenticated users. The folder is writable, readable.
During the "anonymous" checkout, accounts are actually created for these anonyous users. But as UID1, I'm also not getting the tickets by email. I'm getting the order confirmation emails, new account creation emails so the email part is working....
Comment #13
pjcdawkins commentedWhen you say 'validated', are they marked as 'used' already? or do you just mean they are 'valid'?
commerce_event_ticket_mail will not send tickets that are used:
Comment #14
alfthecat commentedThanks pjcdawkins,
I found the issue(s): by default drupal commerce seems to set orders to "processing" after payment is received, not "completed" which triggers the ticket generation rules according to the default settings of this module. On top of that, I had to increase the weight of the "email tickets to customer" rule (to be safe I set it to 3). After doing this, it worked! I've now not tested this with the patch and the latest dev, as earlier in the process I've reverted back to the latest stable, beta2.
Thanks again!
Comment #16
pjcdawkins commented@AlfTheCat thanks for the update, yes it's weird that Commerce doesn't mark orders as 'complete' after checkout by default.
Good catch, I'll patch that directly in the module.
Obviously some better documentation is needed too - see #2368625: General Documentation.
I have committed the patch in #5. Please create a new issue if you have other questions.
Comment #18
pjcdawkins commentedStupid testbot