Page 1 of 1
Little bug in coupons
Posted: 15 Dec 2014, 01:42
by michalkab
Hi,
I meen, that I have found one bug in working with coupons. In controller checkout.php method savepayment is called method checkCouponBasic, which is returning boolean. Returned value is stored into couponId, which is used for storing. So everytime is stored id 1. Correct coupon id is stored in $coupon->getCoupon()['id'].
Am I correct?
Re: Little bug in coupons
Posted: 16 Dec 2014, 00:37
by Jan
Hi, not sure what you exactly mean:
there is a new class: $coupon - and if the basic validation is OK, it returns true, else false
yes, the variable is not correctly named, it is not $couponId but it should be called $couponValid maybe
did you mean this?
Anyway thank you for the information.
Jan
Re: Little bug in coupons
Posted: 10 Jan 2015, 01:03
by michalkab
Hi,
Maybe I wrote it wrong. I meant that $couponId is used as input parameter in method savePaymentAndCouponGuest and savePaymentAndCoupon. So, if method checkCouponBasic will return true, or false, this value is stored into database as coupon id. Instead of correct Id, its always 1.
It is better description? But maybe I am wrong.
Michal
Re: Little bug in coupons
Posted: 13 Jan 2015, 21:19
by Jan
Hi, thank you very much, yes, you are right, instead of the coupon id, we store the coupon (true), always the "number 1" into session.
Thank you, I will take a look at it for the next version.
Jan
Re: Little bug in coupons
Posted: 25 Mar 2015, 16:13
by Jan
Hi, fixed in Beta2, thank you, Jan