Closed (fixed)
Project:
Commerce Coupon (D7)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2014 at 21:18 UTC
Updated:
26 May 2017 at 12:18 UTC
Jump to comment: Most recent

Comments
Comment #1
pixelsweatshop commentedComment #2
dpolant commentedThis has been fixed since this issue has been opened, try latest dev.
Comment #3
HarlsHicks commentedI'm not sure it's been fixed. I'm experiencing the same issue on clean install of Coupon 7.x-2.0-beta4+3-dev.
I'm not really sure what else to report. Any ideas as to what causes it in the first place?
Comment #4
HarlsHicks commentedStill experiencing this issue on the latest dev on fresh install.
Comment #5
pixelsweatshop commentedComment #6
HarlsHicks commentedJust an update on my environment. I'm running the Commerce Order Types module. I have a regular checkout and a "Wholesale" checkout.
I don't experience this bug with our regular checkout. I only experience the issue with the "Wholesale" checkout.
After some poking around, I figured out that this is getting triggered at line 89 in commerce_coupon.checkout_pane.inc. I'm going to research why it's falsely triggering the "Add Coupon" button, but unfortunately I'm still a novice when it comes to PHP.
Comment #7
sangus commentedThis was happening for me on a site that had the UPS shipping module enabled. Whenever the address verification window would pop-up, and you'd click the button to either accept their suggested address or bypass their suggestion, it would cause this problem. It's a bit of a workaround, but I used the "Commerce Checkout Pages" module to create a page ONLY for coupons. This just bypasses the problem altogether. I know it's not the best solution, but I hope it helps someone else.
Comment #8
BD3 commentedFor me, I had some custom jQuery that was causing this. Removed all of my custom JS and it worked. Just incase anyone else is trying to trouble shoot.
Comment #9
dpolant commented@HarlsHicks just getting back into this queue after a big client project ..
Glad you found a workaround but I'd like to figure out why it was doing this. Did you have any jQuery on the page that might have been submitting that "add coupon" button without you actually clicking it? Otherwise I can't really see how that message would be getting triggered because
$form_state['triggering_element']['#name'] == 'coupon_add'.. is gating entry to the part of the code that thinks about setting that error.
Comment #10
HarlsHicks commented@dpolant,
BD3 and I work together, so we resolved the issue together.
It's been long enough now that I'm not quite sure exactly what the jQuery was. It was remnants of another programmer who was trying to do some text replacements on some of the buttons on the checkout pages. What was weird though was that I was able to reproduce the same error (using his snippet), on the Cart page, where Coupon wasn't on the page at all.
I'm not sure how, but for some reason his code was actually replacing button functions. So when it would replace the text on the button (didn't matter what the text was), the button's function would change to be the next button up in the HTML.
Not sure if any of this info will even help, so scrap it if need be, but hopefully it'll give a hint to someone.
Comment #11
dpolant commentedComment #12
rajeevgoleI am facing the same issue in 7.x-2.0-rc3 branch. I have tried in fresh install but no luck.