Copied to clipboard

Flag this post as spam?

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


  • Andrew Bond 18 posts 139 karma points
    Oct 12, 2022 @ 12:13
    Andrew Bond
    0

    Discount code validation.

    Is it possible to add a custom discount code validator, which would check to see if a discount code is valid for item(s) currently in the basket and return a validation message to the checkout view when not?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 12, 2022 @ 14:57
    Matt Brailsford
    100

    Hey Andrew,

    We should fire a ValidateOrderDiscountCodeRedeem when a discount code is being added so you should be able to add your own validation code and fail the validation if it doesn't pass.

    See here for more info https://vendr.net/docs/core/3.0.0/key-concepts/events/#validation-events

    Hope this helps

    Matt

  • Andrew Bond 18 posts 139 karma points
    Oct 12, 2022 @ 15:02
    Andrew Bond
    0

    Perfect.

    Thanks Matt.

Please Sign in or register to post replies

Write your reply to:

Draft