Problem/Motivation

I'm currently writing a rule to process line items in a cart and create "administrative nodes" for some purchased products. These created nodes need to be able reference a line item. Similarly to how you can reference a product and hide the widget, I'd like to be able to do the same for a line item.

Proposed resolution

An attached patch which simply replicates the hidden widget for product reference to line item.

Remaining tasks

Add the helpful hint on the widget form, though I didn't think it was so needed as the widget itself is self explanatory.

User interface changes

Allows developers to select a line item widget to now display on edit forms.

CommentFileSizeAuthor
hidden-line-item-widget.patch1.04 KBjosh waihi

Comments

rszrama’s picture

Status: Needs review » Fixed

I've committed your patch but renamed the widget commerce_line_item_reference_hidden to better match what we have for the product reference field. I also changed the comments to match the widget type.

Commit: http://drupalcode.org/project/commerce.git/commitdiff/7751e80

damien tournoud’s picture

Also see field_extrawidgets for this. I would nearly recommend rolling this back.

rszrama’s picture

Ahh, hmm. Well, we can roll this back and recommend that for line item types, but we still have the hidden widget for product reference fields, too... is it even possible to have an upgrade path across field modules?

Status: Fixed » Closed (fixed)

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