Incorrect coupon codes accepted in basket
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Incorrect coupon codes accepted in basket
Aimeos 2019.10 dev
Laravel 6
PHP 7.2
I've setup a fixed rebate coupon and limited the maximum number of coupon codes a user can enter to 2. ( I'm using one coupon slot for the recently-created Tip decorator) .
I see that the system does not completely reject an incorrect coupon code but instead stores it in the basket.
So If someone enters a wrong code then tries to correct it, they will be unable to enter the correct code because that last coupon slot has already been filled. Sure they can delete the old code but probably won't realize that's an option.
What's the best way to check whether the code is incorrect and if so, reject it instead of saving it in the basket?
Laravel 6
PHP 7.2
I've setup a fixed rebate coupon and limited the maximum number of coupon codes a user can enter to 2. ( I'm using one coupon slot for the recently-created Tip decorator) .
I see that the system does not completely reject an incorrect coupon code but instead stores it in the basket.
So If someone enters a wrong code then tries to correct it, they will be unable to enter the correct code because that last coupon slot has already been filled. Sure they can delete the old code but probably won't realize that's an option.
What's the best way to check whether the code is incorrect and if so, reject it instead of saving it in the basket?
Re: Incorrect coupon codes accepted in basket
Yes, the current implementation doesn't remove the code from the basket:
https://github.com/aimeos/aimeos-core/b ... p#L77-L100
Maybe it's best to remove it here:
https://github.com/aimeos/aimeos-core/b ... on.php#L91
https://github.com/aimeos/aimeos-core/b ... p#L77-L100
Maybe it's best to remove it here:
https://github.com/aimeos/aimeos-core/b ... on.php#L91
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star