1 reply [Last post]
regx@drupal.org's picture
Offline
Joined: 10/30/2007
Juice: 98
Was this information Helpful?

Maybe I am just missing this, but I can't see how to hook a line item deletion.
I have line item hooks defined in a custom store_credits module.
This is for store chains where corporate needs to issue stores credits so it is different from other credit/discount modules

Anyway, if I define the a custom line item as stored = true and add_list = true, then and admin can add and delete line store_credit line items from order / edit
This is sweet!
I can even over-ride the add line-item form for my custom line item which is sweeter still.

What I am having trouble with is finding a hook for line item deletion.
If I could find that I could use line items to do all of the admin grunt work. The module needs to track available store credits, so deleting a spent credit needs to re-allocate it.

Without this I have to use order panes which equates to a lot more code.

Am I missing something?
Am I just lazy? The answer here is a definite yes. I am hoping the former answer is the same Smiling

regx@drupal.org's picture
Offline
Joined: 10/30/2007
Juice: 98
Decided to do this via order_pane and order hooks

I have decided to do this via the normal Order hooks.
It would be really nice to be able to quickly throw stuff like this together via line items though.
Just a few hooks is all it would take.