Questions tagged [coupon]

For questions related to performing discounts on eCommerce transactions. (Please do not use this tag for questions regarding financial calculations regarding bond coupons and interest rates.)

This tag refers to performing discounts on eCommerce transactions (i.e. taking coupons in the applications OpenCart, Magneto, or WooCommerce applications.) Besides the logic to implement the discounts, this tag could also refer to generation of unique or batch coupon codes.

For financial calculations regarding bond coupons and interest rates, please use a different suitable tag, such as:

499 questions
4
votes
1 answer

Send an email notification when a coupon code is used on a WooCommerce Order

How to send order notification to a business partner when a specific coupon is used? I found a solution for the instance when the coupon is applied here : Send an email notification when a specific coupon code is applied in WooCommerce However, I…
Ajay Singh
  • 289
  • 1
  • 3
  • 10
4
votes
1 answer

Add a field to coupon settings and display the value on Woocommerce admin order list

I am having some really hard times trying to make it work. I've had an idea in back of my head to: be able to assign single user to a coupon code through an extra field in general coupon tab, which is listing unassigned users to coupon codes I dont…
4
votes
2 answers

Loading Thousands of Codes to Map to a Shopping Cart Rule in Magento

I've been looking at the salesrule_coupon table, and I've discovered that I can map many coupon codes to a single rule, if the rule itself is of type 'Auto.' This is highly convenient as my client needs us to sync the codes periodically with a feed…
bahoo
  • 392
  • 2
  • 13
4
votes
1 answer

Replace "Coupon code applied successfully." Message in WooCommerce

I'm not sure I did this correctly after having read through the woocommerce_add_$NOTICE_TYPE hook. What I want to do is change the Coupon code applied successfully message into my own custom text like this: The %coupon_name% promotion code has been…
user13639445
4
votes
3 answers

Apply a 100% coupon discount on the cheapest cart item in WooCommerce

I have created a 'BOGOF' (buy one get one free) coupon, using the normal woocommerce coupon method. The coupon gives the user 100% percentage discount on 1 other item in the cart. Coupon settings General: Discount type: Percentage discount…
Char
  • 318
  • 2
  • 17
4
votes
1 answer

Allow specific products to be purchased only if a coupon is applied in Woocommerce

I am working on a woocommerce website and I am trying to restrict a product to be purchased only if a coupon is applied for it, so it should not be processed without adding a coupon code. User must enter a coupon code to be able to order this…
Zain Ali
  • 117
  • 3
  • 9
4
votes
2 answers

Auto apply / remove a coupon code based on cart items in Woocommerce

I wanted to apply a coupon code to cart if cart have minimum 2 items. if not have then the coupon not will apply and show alter message and if have apply then will show a success message here is my code I have tried not working like I…
mdkamrul
  • 274
  • 1
  • 13
4
votes
1 answer

Add the Coupon Code names to Woocommerce View Order details and email notifications

I noticed that in the View Order Details and email confirmations, it reflects a discount line, but doesn't state the actual Discount Code used. Furthermore, if the discount code is $0.00 (we sometimes have a $0 code for special tracking purposes),…
user2337231
  • 109
  • 2
  • 10
4
votes
1 answer

Catch "applied coupon" event to trigger a JS function in Woocommerce

In Woocommerce, is there any way trigger JS after applied coupon like this? I would like to use it in something like this: $( document.body ).on( 'updated_cart_totals', function(){ //do something }); Any help is appreciated.
4
votes
1 answer

woocommerce_get_shop_coupon_data being called 3 times

I am writing a plugin for Woocommerce to do an api call to a coupon provider and I'm hooking into woocommerce_get_shop_coupon_data with: add_filter( 'woocommerce_get_shop_coupon_data', 'wigroup_coupon_injecion', 1, 3 ); All is working as expected,…
BG Smit
  • 63
  • 6
4
votes
2 answers

Set all shipping methods cost to zero for a Free shipping coupon in Woocommerce

I have 3 shipping methods in my cart that should become zero prices as soon as your customer enters Free Shipping coupon. I know how to add a filter in functions.php to detect the coupon but is someone know a snippet to set shipping methods…
user6677795
4
votes
1 answer

Exclude product from all coupons in WooCommerce

I have searched all over the internet, but it doesn't seem to be any answer anywhere in spite of countless people asking the question. Is there any way to exclude a specific product from ALL coupons? I understand that you can do it on coupon…
eMikkelsen
  • 407
  • 2
  • 13
  • 27
4
votes
2 answers

Add Applied Coupon Code in Admin New Order Email Template - WooCommerce

Let me clear my question: I have downloaded & activated WooCommerce Plugin for E-Commerce Functionality. I want to add "Applied coupon code" in Admin New Order Email Template using my custom plugin. Now: Can you tell me that exact Hook or…
4
votes
2 answers

How to generate woocommerce coupon code dynamically using programming code

I want to generate woocommerce coupon code dynamically. My requirements is that after complete the order automatically generate one coupon code in admin side woocommerce coupon code list for particular product. So any one know my above requirement…
Ketan
  • 579
  • 3
  • 11
  • 31
4
votes
2 answers

Fix maximum coupon Discount On Cart percentage in WooCommerce

I have a coupon code (XYZ25) in woocommerce which include 25% off and maximum discount is Rs.250. How can i restrict user's to not get more than Rs.250 Discount if they apply coupon code XYZ25 for 25% discount.
Ravi Shankar
  • 141
  • 3
  • 10
1 2
3
33 34