Voucher based on customer group condition is not working



  • How to replicate the issue:

    1/ Create a customer group, for example HIGHVALUE.
    2/ Create or select existing user, add him to the HIGHVALUE group. Default group can still be Customers or HIGHVALUE, whatever you prefer the issue is the same.
    3/ Create a new voucher with valid dates and this condition: user being in the HIGHVALUE group.
    My action is a 5% reduction on order.
    4/ Go to the frontoffice and login as a user in the HIGHVALUE group. Try to order something and apply the voucher.

    I get the error: “1. You cannot use this voucher”

    This voucher was working in PS 1.6.1.17 and after migrating to Thirtybees it doesn’t work anymore.

    Other vouchers with other conditions seem OK. It seems related to the condition: customer group.



  • I can confirm this bug (on TB 1.0.3) within the cart rules. it also happens when you don’t use a code at all, the discount does not work with selected (new) customer groups.

    Within catalog rules, the group selection discount works fine.



  • Same for me, group selection works in BO > catalog rules.
    Same also, discount doesn’t apply whether there is a code or not.



  • Can you please add this bug to tb github repo issues.



  • I don’t understand I guess, seems to work fine for me…
    0_1519076828243_Capture2.PNG
    0_1519076836483_Capture.PNG
    0_1519076845662_Capture3.PNG

    Then I login as a ‘Wholesale’ user, and use the code, and it works fine… This is in 1.0.3 and 1.0.4



  • Well I have just tested again, created a new rule, same as yours, on 1.0.3, and it still doesn’t work. @smarterweb confirmed the issue on his side too.



  • Don’t know what to tell ya, works fine for me. I’m not sure what is causing the two of you to have issue with it. You might setup a test site, and check how it works on a fresh install, instead of on your migrated sites. Ive set up the voucher with and without a code, works fine both ways. This is on my production 1.0.3 site, and my test 1.0.4 latest source site.



  • ok, just did a fresh install and yes I can still confirm this bug.
    the discount in my case does not get applied. when I choose “highlight” in cart rule, I can even see the name of the discount BUT it does not get applied. price is the same no matter if I switch the cart rule on or off.
    0_1519096478595_2018-02-20 16_06_55-Order - My Store.jpg
    0_1519096499388_2018-02-20 16_07_11-Order - My Store.jpg
    0_1519096634418_2018-02-20 16_16_33-Cart Rules _ Edit_ 10% off in cart • My Store.jpg
    0_1519096645002_2018-02-20 16_16_40-Cart Rules _ Edit_ 10% off in cart • My Store.jpg
    0_1519096649425_2018-02-20 16_16_46-Cart Rules _ Edit_ 10% off in cart • My Store.jpg



  • And it doesnt matter if you put the customer in the Retail group by deafult?

    0_1519096937194_Capture.PNG



  • Are you guys using the same host by chance?



  • @slick_303 It doesn’t matter whether I set the default customer group or not.



  • I am on Cloudways. I have tried changing PHP 5.6, 7.0, 7.1, disabling all caches server-side and on TB admin, and disabling Varnish.
    Is there a way in TB I can enable some debug info/logs that would be more useful than just “1. You cannot use this voucher”?



  • Did you turn error reporting on?



  • BO>Advaced Parameters…go down to Debug Mode and turn on Debug Mode then hit save…
    0_1519139549340_Capture.PNG



  • I have turned on debug mode.
    On every page I see Deprecated: Function mcrypt_decrypt() is deprecated in /home/148926.cloudwaysapps.com/nbamwhxnqa/public_html/classes/Rijndael.php on line 102

    On the cart page, when trying to apply the cart rule I get this screen:
    0_1519146332237_00e245c1-1951-4b05-ba9f-345b40ab8d70-image.png



  • I have confirmed with a fresh install of 1.0.3 on my localhost, this problem is there! wow! At any rate, it is fixed in 1.0.4. Here is a replacement file that should make it work for you, on your 1.0.3 site.
    replace your /classes/CartRule.php with this one…
    0_1519165747057_CartRule.zip



  • The CartRule.php class you provided solved my issue. Thanks for your great help!



  • np. glad to help. sorry it took me so long to recognize the issue. I forgot that I had replaced my file, on my 103 production site…


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.