mitzayapa Posted August 10, 2017 Share Posted August 10, 2017 (edited) Hey guys , I have a strange problem with my ps 1.6.0.8 , for some reason when i manually create a voucher , it appears to all logged clients (my account-my vouchers) , i think its a bug but i can't find the solution for my version (the #5978 aint working). Any idea how to solve it ? It seems it appears to all ONLY if the VOUCHER has a group RESTRICTION. Edited August 16, 2017 by mitzayapa (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted August 10, 2017 Share Posted August 10, 2017 It is a known error in the vouchers database select. Solution - not tested: Change controllers/front/DiscountController.php around line 42: $cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false, true); The second last parameter changes from true to false which might help. Link to comment Share on other sites More sharing options...
mitzayapa Posted August 10, 2017 Author Share Posted August 10, 2017 Done that , not working. After testing it some more , it seems it only occurs when the voucher (code) has a group restriction (one group ain't allowed to use it), If i create a voucher without a group condition , works as it should. how to make this work ? Link to comment Share on other sites More sharing options...
Scully Posted August 10, 2017 Share Posted August 10, 2017 (edited) I haven't heard from group restrictions causing this but it's not impossible. There have been a lot of bug fixes since your PS version. It tested on 1.6.1.15 with a group restriction. If set to customer and customer is logged in - I see the voucher. If set to guests or visitors, I don't see the voucher. Edited August 10, 2017 by Scully (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted August 10, 2017 Share Posted August 10, 2017 Do you wan't to try my CartRules file? The change I wrote above needs to be set - otherwise you might get vouchers where they shouln't appear. Link to comment Share on other sites More sharing options...
mitzayapa Posted August 11, 2017 Author Share Posted August 11, 2017 I guess its a bug thats solved in newer versions of prestashop , meanwhile the solution i found is this one : getCustomerCartRules funcion from Cartrule.php , remove the "OR cr.group_restriction = 1" (thats the tricky condition). Anyway , thanks alot for your help , and for the fast replies. Link to comment Share on other sites More sharing options...
Scully Posted August 12, 2017 Share Posted August 12, 2017 Thank you for reporting back. Very good. You might add 'SOLVED' to your topic title. Link to comment Share on other sites More sharing options...
mitzayapa Posted August 14, 2017 Author Share Posted August 14, 2017 well , i can't find where to edit the Title ....i'm kinda dumb these days... Link to comment Share on other sites More sharing options...
Scully Posted August 14, 2017 Share Posted August 14, 2017 You can edit the first post - there you can change or add to the topic. Link to comment Share on other sites More sharing options...
mitzayapa Posted August 16, 2017 Author Share Posted August 16, 2017 Done. Thanks alot for your help. Link to comment Share on other sites More sharing options...
Scully Posted August 23, 2017 Share Posted August 23, 2017 You're welcome and sorry for the late reply. Always happy prestashopping. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now