Little bug in coupons

Phoca Cart - complex e-commerce extension
michalkab
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 09 Dec 2014, 02:41

Little bug in coupons

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Little bug in coupons

Post 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 :idea:

did you mean this?

Anyway thank you for the information.
Jan
If you find Phoca extensions useful, please support the project
michalkab
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 09 Dec 2014, 02:41

Re: Little bug in coupons

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Little bug in coupons

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Little bug in coupons

Post by Jan »

Hi, fixed in Beta2, thank you, Jan
If you find Phoca extensions useful, please support the project
Post Reply