Skip to main content
added 2 characters in body
Source Link
Brad Bell
  • 67.6k
  • 6
  • 75
  • 145

Applying coupon codes via urlURL

I was wondering if it was possible to allow a customer to apply a coupon code using a urlURL or urlURL params in commerceCommerce 2. I haven’t been able to find any questions on stack exchange or on the web, but the scenario I’m trying to support is:

  • Customer receives an email with a coupon code (includes a coupon code image that links to the storefront)

  • Customer clicks a link which takes them to the store and automatically applies the coupon with a toast confirmation (e.g. store.com?coupon=somecouponcode)

  • Customer adds purchasables to cart and when they go to the cart page, the coupon is already applied to cart lineitems without requiring them to manually input it themselves

Applying coupon codes via url

I was wondering if it was possible to allow a customer to apply a coupon code using a url or url params in commerce 2. I haven’t been able to find any questions on stack exchange or on the web, but the scenario I’m trying to support is:

  • Customer receives an email with a coupon code (includes a coupon code image that links to the storefront)

  • Customer clicks link which takes them to the store and automatically applies the coupon with a toast confirmation (e.g. store.com?coupon=somecouponcode)

  • Customer adds purchasables to cart and when they go to the cart page, the coupon is already applied to cart lineitems without requiring them to manually input it themselves

Applying coupon codes via URL

I was wondering if it was possible to allow a customer to apply a coupon code using a URL or URL params in Commerce 2. I haven’t been able to find any questions on stack exchange or on the web, but the scenario I’m trying to support is:

  • Customer receives an email with a coupon code (includes a coupon code image that links to the storefront)

  • Customer clicks a link which takes them to the store and automatically applies the coupon with a toast confirmation (e.g. store.com?coupon=somecouponcode)

  • Customer adds purchasables to cart and when they go to the cart page, the coupon is already applied to cart lineitems without requiring them to manually input it themselves

Source Link

Applying coupon codes via url

I was wondering if it was possible to allow a customer to apply a coupon code using a url or url params in commerce 2. I haven’t been able to find any questions on stack exchange or on the web, but the scenario I’m trying to support is:

  • Customer receives an email with a coupon code (includes a coupon code image that links to the storefront)

  • Customer clicks link which takes them to the store and automatically applies the coupon with a toast confirmation (e.g. store.com?coupon=somecouponcode)

  • Customer adds purchasables to cart and when they go to the cart page, the coupon is already applied to cart lineitems without requiring them to manually input it themselves