Questions tagged [discount]
405 questions
3
votes
1 answer
WooCommerce: Double discount on sale products with coupon
I want to double the discount for products on sale with a coupon code.
For example: The product is on sale with a 10% discount. If I add the coupon code doublediscount I want to double that discount to 20%.
The coupon discount should have limit of…

Cray
- 5,307
- 11
- 70
- 166
3
votes
1 answer
How to set Dynamic Discount on each Cart Item programmatically?
I want to set the Discount (say $10) per Item dynamically, after a custom button is pressed, in the Checkout Cart page. I have checked some of the coding of Magento, to find that:
Mainly the "Mage_Sales_Model_Quote_Address" class is affected…

Knowledge Craving
- 7,955
- 13
- 49
- 92
3
votes
1 answer
Automatically add a percentage discount if WooCommerce cart contains at least X products
I am trying to create an automated discount that kicks in when and if the cart contains a minimum of three products or more.
If and when that is, a discount of 10% should be given no matter if the customer is logged in or not.
This is the code I'm…
user14906105
3
votes
1 answer
Set a minimum undiscounted order amount in WooCommerce
I am using "Minimum Order Amount" to require a minimum order amount.
If I have a basket of € 50 of purchase and I apply my 10% discount code, I can't order my shopping cart because the total is € 45.
But I want to order for < € 50 ONLY with a…

microb14
- 453
- 4
- 16
3
votes
1 answer
Automatically apply discount to user role if no coupon is applied in Woocommerce
I have this code below but I want it to be effective only if the user is not using another code, and if the user uses another coupon, then disable this one.
based on "Apply a discount for a specific user role in Woocommerce" answer code, I've been…

Pepito Perez
- 35
- 3
3
votes
2 answers
Applying a WooCommerce coupon conditionally based on product attribute terms
I am trying to exclude some product variations that have specific product attributes from coupon discounts.
In my case I am targeting product variations that have a product attribute "finish" set to "Classic Frame" or "Box Frame" term.
I tried to…

MitchellK
- 2,322
- 1
- 16
- 25
3
votes
1 answer
Custom cart notice based on user total purchased amount in Woocommerce
I am trying to display a custom cart notice based on user total purchased amount in Woocommerce, based on this answer code:
Add a percentage discount based on customer total purchases sum in Woocommerce
It does not work as I would like.
For example…

Lê Nghĩa
- 255
- 4
- 15
3
votes
1 answer
Woocommerce global percentage discount on simple products if customer is logged in
I'm looking for advice on what's wrong with the following function.
My goal in this example is to apply a 50% off discount to all WooCommerce simple products, as long as the user is logged in.
function tier_pricing_logic() {
if (…

Sam Assoum
- 437
- 1
- 8
- 21
3
votes
1 answer
Stripe payment discount for a specific Bank Credit Card
I am implementing online payment app with Stripe v6.1.1.
Every thing works fine, But now I have to implement, giving certain percentage or amount Discount for specific bank credit card when user do transaction with my application.
I go through…

Waseem
- 439
- 3
- 18
3
votes
4 answers
Calculate and Display % Discount for price classes Javascript
I am looking for help with javascript. We are trying to calculate and display the difference in percentage between a price before discount and a price after discount. The relevant classes are .from_price and .for_price. The prices look like this…

Tester
- 31
- 1
- 2
3
votes
1 answer
Add total discount coupons amount in Woocommerce checkout
I am trying to add up all of my added coupons to get a discount total in the checkout. I tried adding a variable at the top of the checkout template file and doing ++ for each entry but I throws errors.
Any ideas how to add the values to a variable…

jord49
- 542
- 2
- 17
- 37
3
votes
2 answers
WooCommerce discount: buy one get one 50% off with a notice
After my previous question WooCommerce discount: buy one get one 50% off I want to add custom notice to the cart, whenever a particular product(not all the products) gets added to the cart.
I want to check the quantity first, if it's 1 then I want…

abdul
- 133
- 3
- 13
3
votes
1 answer
Adding a discount by cart items conditionally based on the item quantity
I have set up a Woocommerce shop and wish to set up a specific discount on all products based on multiples of 12 (a box). I've tried many discount plugins but haven't found what I am looking for.
For example, if I order 12 of product X, I get a 10%…

Phovos
- 33
- 1
- 6
3
votes
1 answer
Conditional progressive percentage discount based on cart item count in Woocommerce
I would like to have a conditional progressive discount based on number of items in cart. After you added 2 products to the cart, you get a discount. More products you add and more discount you get.
For example:
1 product – full price (No…

Kasper
- 105
- 1
- 6
3
votes
2 answers
Java, item shop discount math error
This program is meant to act as a shop, with a number being inputted for a corresponding item and a quantity. The catch is that if you want three or more items you receive a 10% discount on the purchase and any decimals should be truncated (staying…

katef
- 31
- 4