[FW][FIX] website_event_sale: don't remind people of unavailable tickets #210500
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Versions
Steps
Issue
You still get an email reminding you to buy the ticket, even though it's no longer available. As a consequence, you can still pay the sales order, but it won't get confirmed.
Cause
There is no custom logic in place for
website_event_sale
to filter out abandoned carts with tickets that are no longer eligible.Additionally, the
is_sold_out
field of tickets can beFalse
while the event'sevent_registrations_sold_out
field isTrue
.Solution
event_registrations_sold_out
field as a dependency toevent.event.ticket
's_comute_is_sold_out
method._filter_can_send_abandoned_cart_mail
which filters out carts with tickets that are sold out, or events with no free places remaining.opw-4453539
Forward-Port-Of: #210236
Forward-Port-Of: #199877