Reviewed & tested by the community
Project:
Commerce Coupon (D7)
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2014 at 19:48 UTC
Updated:
20 Dec 2018 at 04:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ruscoe commentedComment #2
ruscoe commentedComment #3
joelpittetThis looks like a nice UI change, did you consider maybe an alter hook too? Then the control can be given to the devs as well?
Comment #4
mdupree commentedAs for the Joel's option in #3. Not sure how to implement the alter hook.
But I Reviewed patch #1, all seems to be working ! Great job !
Comment #5
mdupree commentedComment #7
torgospizzaPatch is pretty old so it's gonna need a re-roll.
Comment #8
mdupree commentedHopefully I did this correctly, but I re rolled the patch, all applies cleanly.
Comment #9
mdupree commentedComment #12
mdupree commentedTest failed because it couldn't find file at line 6 of the patch ( commerce_coupon.module ) not sure why that's happening. If someone know's and would like to explain would be much appreciated.
Other then the failed test the patch does apply clean to latest dev release.
Comment #13
torgospizzaWhat command did you use for your patch creation? It looks like you used your IDE to generate it - you might try from command-line instead.
The main difference I can see from your patch and the one above that worked is a missing slash in the front (/commerce_coupon.module) which makes me think you may either need a flag, or may need to remove a flag (for instance --relative).
I also can't tell from the patch if you generated it using the Drupal git repo's version of the module or one from your local working copy? If you use the Drupal git repo as your root level it may go more smoothly.
Hopefully one of these clues will help!
Comment #14
mdupree commented@torgosPizza I did indeed use the IDE to produce the patch, the module was pulled from drupal using git. I will use your tips and try again using command line!
Thanks for the help.
Comment #15
mdupree commentedTrying again for patch test !
Comment #16
das-peter commentedJut got the requirement to be able to introduce a pattern into generated coupon codes. As this issue already takes care of adjusting
commerce_coupon_generate_coupon_code()I pick up the idea of @joelpittet in #3 and introduce an alter hook.A working example of how to use the new hook has been added to the api documentation file.
Comment #17
das-peter commentedCreated #2949884: Allow user greater control over generated coupon codes to bring the new features to "Commerce coupon batch" as well.
Comment #18
chris matthews commentedThe patch in #15 applied cleanly to 7.x-2.x-dev and is an excellent improvement to the module! I tested different combinations of 'Use alphanumeric characters' and 'Use uppercase characters' and the randomly generated code came out correctly each time. I would love to see this get committed to 7.x-2.x so it's included in the next release (7.x-2.0 was released in July 2017)
Comment #19
torgospizza@Chris2: Did you try das-peter's patch in #16?
Comment #20
chris matthews commentedAh, sorry about that. das-peter's patch in #16 also applied cleanly to 7.x-2.x-dev and the alter_hook steps up the improvement even more for devs.