-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple issues #1
Comments
I think the condition linked above does make no sense for our configuration, while it generally makes no sense to provide unique codes for welcome discounts. |
If I understand what you are trying to do correctly, you are trying to create a coupon that can use an unlimited amount of time but only once per customer. The problem that I was solving at the time was slightly different, and only half of the original problem which was to prevent a guest customer from adding a coupon that was set to use X times (not unlimited). But to accomplish your goal should be easy
You can find most of the logic here https://github.com/magepal/magento2-guest-to-customer/blob/master/Controller/Guesttocustomer/LookupformPost.php#L83 |
Thanks for pointing me into the right direction. I will post the final code. First thing would be to implement searchCriteriaBuilder. |
Untested, but should look something like this
|
Thanks again - I also didn't test your code, I was just reading about multiple AND's to realize the query you posted first. If it is as easy as adding multiple addFilter calls that would be nice. I found a note by Alan Storm that the searchCriteriaBuilder doesn't have the addFilter method. I have to test it. |
My current state is here That is working so far, but I need to observe another event or call a custom controller in the checkout on e-mail fields focusout event. That is cause if you enter the discount code in cart, and then procede to checkout were you enter the email address afterwards, aroundCanProcessRule() method want be called again. |
I just did a quick test, and whenever I pressed the "Next" button on checkout shipping step the One of the reasons I did not bother to implement this was because it was so easy to bypass ..... I could just checkout with myemail+1@gmail.com ... myemail+2@gmail.com etc |
Yes, you are right, but we are using a onestepcheckout... I can understand your arguments, but I see things a bit different:
|
I have used this code on "onestepcheckout" before but It's hard to say without knowing which one step checkout you are using. You could use a mixture of JS mix-in and plugin for rest/default/V1/customers/isEmailAvailable to trigger to remove the coupon in invalid. |
Hey,
we just installed your module in a M2.2.2 system... Thanks for providing it. We tried to install it by composer first, but it looks like the package is missing on packagist.
So far so good, we wen't on by installing it in the app folder and procede the setup:upgrade, di:compile etc. This did work as expected.
In the next step we tried to avoid the discount like described in the readme. We got a rule, that enables 5% discount for new customers if they type in the code "neukunde". The field "Uses per coupon" is set to 0 (everything else doesn't make sense in case of one code for all), the field "Uses per customer" is set to 1 which never match the methods condition here.
Regards
Jan
The text was updated successfully, but these errors were encountered: