Closed (duplicate)
Project:
Commerce Coupon (D7)
Version:
7.x-1.0-beta6
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2012 at 18:02 UTC
Updated:
4 Feb 2013 at 17:57 UTC
There is no implementation of commerce_coupon_line_item_add_form() or commerce_coupon_line_item_add_form_submit() in commerce_coupon.module. As a result, when adding a coupon to an order from the admin UI, there is no way to specify which coupon code to use. I was looking at other issues in the issue queue, and it looks like this form used to exist; what happened to it?
Also, note that the submit handler should add a reference to the coupon in the commerce_coupon_order_reference field on the order.
Thanks!
PS - See attached screenshot for what it looks like when trying to add a coupon.
| Comment | File | Size | Author |
|---|---|---|---|
| After clicking the "Add line item" button | 31.33 KB | jessepinho | |
| Before clicking the "Add line item" button | 30.59 KB | jessepinho |
Comments
Comment #1
pcambraPlease search the issue queue before adding "major" bug reports.
#1515860: Coupon admin line item add form fixed
Comment #2
jessepinho commentedI had seen that before, but for some reason I didn't think it was the exact same issue at the time. Sorry about that!
Am I to understand, then, that the line item form will only show up if a coupon sub-module (like fixed-amount coupon, for example) is installed? Because I don't have any of those installed—I simply have the base Commerce Coupon module installed, and I've created a custom coupon type.
Comment #3
pcambraYou can't add a coupon line item from the same interface that you would add a product... you can do it in the coupon reference field set as entity reference, that field is called commerce_coupon_order_reference and it's created by commerce_coupon_order_configuration function
Comment #4
jessepinho commentedThat doesn't actually create a line item for the coupon, though. No discount is applied to the order after I've added a coupon reference to that field, and no coupon line item is created. Any idea why this is/how to fix it? =/
Comment #5
pcambrawhat type of coupon are you using?
Comment #6
jessepinho commentedI made a custom coupon type with Amount and User fields. (I've only installed the base Commerce Coupon module.)
Comment #7
pcambraThen you need to take care of what you do on add the line item yourself in your module, check pct or fixed amount modules for examples.
Comment #8
jessepinho commentedOK. Thanks so much for your help! I do think that this functionality should come with the basic Commerce Coupon module, though (as well as the "granted amount" functionality, which currently shows up as blank for me). I guess I should file that as a feature request. It just seems strange that, to get the basic coupon functionality, you need to install an additional contrib module.