I created a custom line item (not based off the Product line item type) type for coupons the customer adds to their cart, which works great so far except for the fact that the Remove button in the views handler will not remove the coupon. I believe this is because the code uses a function which would only remove a product, which is reasonable, though I think coupons are a potential big exception to this. There is a "todo" comment in the code saying that in the future the dependency on the cart api for this functionality should be removed. Just mentioning it here in case this todo was forgotten and to ask if this item might be addressed in the near future. See commerce/modules/line_item/includes/views/handlers/commerce_line_item_handler_field_edit_delete.inc, line 63.
Comment | File | Size | Author |
---|---|---|---|
#4 | commerce-delete_line_items_without_products-2261289-4.patch | 1.78 KB | acrollet |
| |||
#2 | commerce-delete_line_items_without_products-2261289-2.patch | 2.94 KB | acrollet |
|
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedJust triaging the metadata here; there are a wide variety of @todo comments in the code that we don't have issues for, but I think it's fair to treat these as known tasks if we need issues for them. Patches welcome. : D
Comment #2
acrollet CreditAttribution: acrollet at roomify - online and open source reservation solutions commentedpatch attached.
Comment #3
rszrama CreditAttribution: rszrama at Centarro commentedThis patch still depends on a function from the Cart module, so it doesn't really resolve the @todo.
Comment #4
acrollet CreditAttribution: acrollet at roomify - online and open source reservation solutions commentedUpdated patch attached.
Comment #5
AnybodySee #1365316: Can Not Delete item from cart for an alternative aproach, which I think is cleaner?
Eventually close this as duplicate if the other patch works.