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?
Little bug in coupons
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Little bug in coupons
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
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
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 09 Dec 2014, 02:41
Re: Little bug in coupons
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
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
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Little bug in coupons
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
Thank you, I will take a look at it for the next version.
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Little bug in coupons
Hi, fixed in Beta2, thank you, Jan
If you find Phoca extensions useful, please support the project