Closed cholawo closed 1 month ago
I've commented about this here, but it's mostly due to issues with soft-deletion. If you delete a purchased ticket, it'll soft delete the ticket, adding back capacity to the event. But restoring it will reverse that. What if the event is sold out already?
There's also the assumption that if you delete a purchased ticket you want ticket capacity to be affected, and you're assuming the ticket has been cancelled. There has been an occasion where a client of ours has wanted to delete a ticket (mistakenly oversold an event) and they would not want this behaviour.
So it's a bit tricky - which is also why I imagine Commerce doesn't do the same thing with product stock levels when an order is deleted.
Thanks for the prompt reply. I did read your comment about Commerce order soft-delete before I created this issue and I can appreciate that conundrum with regards to orders, however since I could see now way to restore a deleted ticket, I thought it should have restored capacity (I didn't know they were soft-deleted).
I need to document the correct procedure for what an admin should do when a customer wants to cancel an order. I think they would need to:
This is quite an inconvenient process for what I would think is the most common use case, but I do take on board what you're saying about intention. I think I'm going to have to add some well labeled buttons to the interface to automate some of these steps away for a smoother cancellation process.
I'd like to improve this for sure, and likely buck the trend of what Commerce is doing. I just need to some up with a better way of handling that! I'll keep this open in the meantime.
Thanks!
There might be some easy wins to improve the process before automation is in place. I think the most important would be helping admins get from viewing the commerce order to viewing a list of its tickets. If I could get a link on the commerce order page that points to the purchased tickets list that would help. Something like /{cpUrl}/events/purchased-tickets?order=b1253d2
. It looks like the purchased ticket page doesn't look at url parameters at present though.
I have found that I can link to purchased tickets from a commerce order by adding a template to the order fields. This means admins can navigate directly from order to its tickets and delete them where necessary. I'm just documenting this in case it helps anyone else.
{% set tickets = craft.events.purchasedTickets().orderId(element.id).all() %}
{% if tickets|length %}
<h1>Purchased Tickets</h1>
<ul>
{% for ticket in tickets %}
<li>
<a href="/admin/events/purchased-tickets/{{ ticket.id }}" target="_blank">
{{ ticket.event ? ticket.event.title : '' }} - {{ ticket.ticketType }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
Updated in 3.0.0-beta.3.
Describe the bug
When a purchased ticket is deleted, the available quantity doesn't go up by 1.
Steps to reproduce
Craft CMS version
3.7.48
Plugin version
1.4.22
Multi-site?
No
Additional context
No response