Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Line item
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2010 at 02:47 UTC
Updated:
26 Aug 2010 at 04:20 UTC
There's an API function / entity controller method for deleting line items, but it currently doesn't delete any references to the line item from line item reference fields. The complicating factor here is there isn't a magic query we can execute... it'll be different on every site depending on the name of line item reference fields used. We need to interact with the field API somehow to update the values for the line item reference fields that reference the deleted line item so we know what we need to update and to make a new revision if necessary.
Comments
Comment #1
rszrama commentedfwiw, this code should go in commerce_line_item.controller.inc in the class's delete function. I imagine it'd be a part of this foreach loop:
Comment #2
rszrama commentedDone with the function commerce_line_item_commerce_line_item_delete().
http://github.com/rszrama/drupalcommerce/commit/c58655e31b4c1676f15a2403...