Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Francis Benyah 35 posts 111 karma points
    Jun 23, 2020 @ 07:18
    Francis Benyah
    0

    Code Discounts Not Taking Effect

    Hi Matt

    Bugging you again. Hope you are well.

    So I setup a test discount using the automatic type and works as expected.

    I then setup another discount using code type and this does not have any effect on the cart. So I just though I will delete that maybe I did it wrong and setup a very simple one with no rule just subtract 5% from the total when the applicable code is applied.

    enter image description here

    The source code is the same as you have on the demo site only difference is that I apply this on the cart and not on checkout so before the order is finalized.

    enter image description here enter image description here enter image description here

    Is that the reason it is not being applied? If so is there a work around?

    I have the latest versions of vendr 1.2.5 and all the other related dependencies are up to date.

    Thanks

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 23, 2020 @ 08:16
    Matt Brailsford
    1

    Hey Francis,

    So it looks like we have a bug here due to the fact that we actually calculate discounts before the order total price is calculated and so any discounts that affect the Order Total Price aren't taking effect because at the time of their calculation, the order total price is 0 and so any percentage of 0 is still 0 and so the discount isn't applying.

    We'll need to look into updating the flow such that the order total discounts can apply once the order total is known.

    I've created an issue for it here and will take a look as soon as I can https://github.com/vendrhub/vendr/issues/143

    In the meantime, I believe amount discounts do work, and so should percentage discounts on the sub total so hopefully that is enough to work around the problem for now.

    Matt

  • Francis Benyah 35 posts 111 karma points
    Jun 23, 2020 @ 09:06
    Francis Benyah
    0

    Okay cool no problem

    I will use the subtotal instead close to the the same thing.

    Thanks Matt

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 23, 2020 @ 09:11
    Matt Brailsford
    101

    Just to let you know, I've found and fixed the bug. A fix will be released in 1.2.6 later this week.

    https://github.com/vendrhub/vendr/issues/143

    Thanks for reporting

    Matt

  • Francis Benyah 35 posts 111 karma points
    Jun 23, 2020 @ 09:14
    Francis Benyah
    0

    That was quick thanks Matt!!!

    Cool will just leave everything as is then on my side and wait for the update.

    Still got a few more things to do on the site in any case.

    Really appreciate it Matt.

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft