Currently if you delete a line item on an order that has registrations associated with it, those registrations stick around and are still associated with the order, but the line item will no longer exist.

It may not make sense to every situation to delete these registrations, but it makes sense to make it the default behavior. Rules could be used to handle this if there was a rule that allowed you to load all registrations associated with a particular line item.

Comments

acrazyanimal created an issue. See original summary.

acrazyanimal’s picture

Here is a patch that adds a new rule action to load a list of registrations associated to a line item. It also provides a default rule to delete registrations associated with a line item when the line item is deleted. By default it is enabled for new installs, but for older installations there is a db update that makes it disabled by default.

acrazyanimal’s picture

acrazyanimal’s picture

Status: Active » Needs review
xaffimarc’s picture

@acrazyanimal Dude.... Your code has just rescued me!! ... i dont need the exact functionality in the initial request, but rather, im trying to load all the registrations associated with an order and then modify a field on them at the point of checkout.

You and your code have just got me a significant step closer!!

Just wanted to say thank you!! :)

acrazyanimal’s picture

@xaffimarc Thanks for the feedback. Would you be willing to review the patch and functionality and mark this RTBC if everything checks out?

  • acrazyanimal committed 395b04a on 7.x-2.x
    Issue #2633574 by acrazyanimal: Delete registrations when a line item is...
acrazyanimal’s picture

Status: Needs review » Fixed

Committed since this is useful functionality.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.