verbb / events

Craft CMS Plugin for events management and ticketing.
Other
22 stars 13 forks source link

'Purchased Tickets' not showing customer email for guest checkouts #85

Closed mark-adigital closed 3 years ago

mark-adigital commented 3 years ago

Hey - it seems as though for orders where the customer checked out as a guest, the 'Customer' column on 'Purchased Tickets' doesn't include their email address. All the info is accessible just by clicking through to the 'Order' view in the final column, but I just wondered if it would be possible to include the email directly in the table of ticket purchases too?

engram-design commented 3 years ago

Fixed for the next release. To get the fix early, change your verbb/events requirement in composer.json to:

"require": {
  "verbb/events": "dev-craft-3 as 1.4.17",
  "...": "..."
}

Then run composer update.

mark-adigital commented 3 years ago

Thanks, I tried applying that but it didn't appear to have any effect, so I went into the src/elements/PurchasedTicket.php file you edited and moved the if ($order =...) conditional you added above the if ($customer =... which did have the desired effect, I think because even when it's a guest order that returns a blank email, $this->getCustomer() still returns something so the blank string return takes precedence.

Hopefully saying if ($order =...) first doesn't have some other horrible side effect!

engram-design commented 3 years ago

Yep, you're right - not sure what I was thinking there. Updated the branch now.

mark-adigital commented 3 years ago

That's great thanks, all working for me now.

engram-design commented 3 years ago

Will keep open to remind me to push a new version!

engram-design commented 3 years ago

Fixed in 1.4.18