Hello pcambra,
I just installed Coupon + Coupon_pct on a kickstart to test it. I'm not sure this is the intented behavior, but when i create a 20% discount coupon, and use it on an order, the "Coupon Granted Amount" column remains empty.
I'd like to know if this is the intended behavior (as it's "normal" that it's empty, as the discount amount is variable), or it should be calculated ?
So basically, the "Coupon granted amount" column should be filled with:
1/ Nothing, because the amount is variable
2/ Display the discount rate of the coupon (say 20%)
3/ The calculated amount based on the order and the coupon discount rate
What do you think ?
Pascal
Comments
Comment #1
liupascal commentedForgot to attach a screenshot
Comment #2
pcambraYes, this is a known problem, working on it
Comment #3
liupascal commentedOk thanks - Then what will be the behavior of it ?
Comment #4
pcambraAs I see it, it should insert a given amount on redeem and then update it with line item or order refresh hooks, that's my intented approach for this.
Comment #5
nicola.peluchetti commentedI'm giving a look at this, what hooks are responsible for the behaviour?If i fix this i submit a patch
Comment #6
muschpusch commented@pcambra: sorry i don't really get your answer. I think this rules action in commerce_coupon.rules.inc is where the magic happens (or not). The problem is that afaik the percentage coupon alters the product line items in a loop so there is no way (i know) who to pass the reductions into a variable and save them to the log.
Comment #7
pcambraMarking this as fixed as the coupon log reflects the correct amount now.
Comment #8
nicola.peluchetti commented@pcambra is there a new version?
With the old version it's still not working
Comment #9
pcambraIt's committed to -dev, so you either grab it from git directly or wait until the -dev version gets populated (the process runs each 12h)