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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | commerce_registration-delete-line-item-registrations-2633574-0.patch | 7.46 KB | acrazyanimal |
Comments
Comment #2
acrazyanimal commentedHere 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.
Comment #3
acrazyanimal commentedComment #4
acrazyanimal commentedComment #5
xaffimarc commented@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!! :)
Comment #6
acrazyanimal commented@xaffimarc Thanks for the feedback. Would you be willing to review the patch and functionality and mark this RTBC if everything checks out?
Comment #8
acrazyanimal commentedCommitted since this is useful functionality.