How to share a shop link with coupon code

How can we share a link with coupon code. So that the customer need not to enter coupon code in cart.


3 answers

  • 1
    Mike Webasyst April 29, 2019 08:44 #

    There is no such option by default. You will need to write a plugin to add this functionality.

  • 1

    Can you suggest a hook and execute function.


    • +1
      Mike Mike Webasyst April 29, 2019 17:31 #

      Try to link your plugin to frontend_error hook. Generate a unique URL for a coupon, which should trigger a 404 error, and let customers open such a URL in their browsers. Once a 404 error is registered in the event handler, you may save the corresponding coupon in the user session. Once a customer reaches the checkout page, you may copy the coupon code from the session to the coupon field and optionally trigger the submit event to get the coupon automatically applied.

  • 1 Expert Developer August 18, 2019 03:28 #


    Though I find a very simple way of doing this.

    thanks again

Add answer

To add a comment please sign up or login