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
3
votes
3 answers

Get a coupon code dynamically from WooCommerce in a custom function

With reference to "Allow specific products to be purchase only if a coupon is applied in Woocommerce" answer code to one of my previous questions, the coupon code is hardcoded in the function and need to match from an existing coupon code in…
Zain Ali
  • 117
  • 3
  • 9
3
votes
1 answer

Display a WooCommerce coupon input field anywhere with a shortcode

I have a small project on what I need to insert Woocommerce coupon field into any page, but this seems complicated for me. I searched on Google about this, but don't have any resources about this. Found this codes about inserting field. Inserted…
Bern
  • 65
  • 2
  • 10
3
votes
1 answer

Display Cart Item subtotal striked when discounted by a coupon in Woocommerce

I am trying to add Coupon Discount on cart items and I am able to do that but the issue is I don't want to stick out the item which doesn't have coupon discount items. Currently, It looks like this way But I Want it to look like this way. In…
Ashfaq Ahmed
  • 53
  • 1
  • 6
3
votes
1 answer

List Coupon with order details in WooCommerce

I have a site with 1000 coupons. All the coupons have a usage limit of one. Im using the code provided by Raunuk Gupta to export coupons directly from the SQL database. How WooCommerce Coupons are stored in Database ? Is it possible to retrieve…
Schalk Joubert
  • 398
  • 3
  • 19
3
votes
1 answer

How to add coupon to WooCommerce product page

I am using WordPress (4.9.8) with WooCommerce (3.4.5) and I would like to add a coupon field in single product pages. I've been looking at all Woocommerce templates, but I cannot find a way to add the Woocommerce coupon field onto the product…
bjornen
  • 107
  • 1
  • 7
3
votes
1 answer

Woocommerce coupon rounding issue

In our store we enter prices including tax. On frontend we hide decimals (In Sweden we don't really use decimals anymore in prices), but backend we keep them. This is why: https://krokedil.com/dont-display-prices-with-0-decimals-in-woocommerce/ We…
3
votes
1 answer

Add WooCommerce coupon code automatically based on product categories

I am trying to add a coupon code automatically if the cart has products from specific categories. The price must be updated in the Total after showing the discount amount. But I cant see any changes in the total, kindly help me. My…
SandeepTete
  • 315
  • 3
  • 17
3
votes
1 answer

Limit a WooCommerce coupon code to defined weekday only

I would like to restrict a coupon code "XYZ" usage only for defined weekdays, from Monday to Thursday only. For other days (friday to sunday) it will show an error notice. Is it possible? How can I achieve that? Thanks
Ravi Shankar
  • 141
  • 3
  • 10
3
votes
0 answers

Creating Woocommerce Coupon Programmatically

I'm trying to generate woocommerce coupon programmatically from my custom wordpress plugin. Generally it works and creates coupon but some of coupon adding option still not works. For example Email Restrictions and Product Categories not adds on…
Shako Tskhadadze
  • 149
  • 1
  • 2
  • 11
3
votes
2 answers

Conditionally apply coupons automatically for specific Product IDs and quantities

I am trying to automatically apply coupons in my WooCommerce store based on product ID and quantity conditions. My end goal is for a particular coupon to apply automatically when TWO (2) of the desired products are added to the cart, and for another…
GDailey
  • 71
  • 11
3
votes
1 answer

How to check which coupon is applied to which product in WooCommerce?

Since we can apply different coupons to each product in an order, Is there any method to know which coupon is applied to which product? I've used $order->get_used_coupons() function but it just returns the used coupon codes only. Please help with a…
Mûhámmàd Yäsår K
  • 1,492
  • 11
  • 24
3
votes
3 answers

How to disable cart page from showing coupon notice when adding coupons with ajax?

I am adding coupons in woocommerce programmatically, and is working quite fine via ajax from another page, not the checkout page. However, everytime I go to the checkout page, it says, "Coupon has been applied", but I already applied the coupon…
Solomon Closson
  • 6,111
  • 14
  • 73
  • 115
3
votes
1 answer

Woocommerce Single Use Coupon not updated on use

Ok this is my scenario, I have a single use coupon 12345, and two users A and B use the same coupon at same time. If User A has applies the coupon and is currently at the payment page, Woocommerce accepts the same coupon 12345 from user B and both…
de-bugged
  • 935
  • 4
  • 14
  • 34
3
votes
1 answer

How to allow Magento coupons in checkout

I'm able to create coupons in the backend however in the checkout process, the option to enter a coupon is not there. The only other information I can find on this is how to disable coupons by commenting out the line block…
CarlPB
  • 33
  • 1
  • 3
3
votes
0 answers

Magento Promotion Rule Coupon Code is not Valid

I have set a very basic Promotion Shopping Cart Price Rule (Magento ver. 1.6.2.0) just to test that this feature works in my site... but always I receive the same message: "Coupon code is not valid" I'm going nuts with this... These are the…
cconur
  • 107
  • 2
  • 11