Questions tagged [discount]

405 questions
1
vote
1 answer

Woocommerce percentage discount per item based on quantity

Based on WooCommerce Cart Quantity Base Discount answer code, I apply a discount from xx products on shopping cart with the following: add_action( 'woocommerce_cart_calculate_fees','wc_cart_quantity_discount', 10, 1 ); function…
microb14
  • 453
  • 4
  • 16
1
vote
1 answer

WooCommerce promotional discount: Buy 10 Get 1 Free

I'm trying to set up a specific discount for three variable products (464, 465 and 466). If a customer buys ten products they get one for free. Based on WooCommerce discount: buy one get one 50% off answer code, I've come up with the following…
1
vote
1 answer

Weight based progressive discount displays remaining weight to get a better discount message

I'm using Apply a progressive discount based onWoocommerce cart total weight answer code (to my previous question) to add volume discount based on total cart weight. The code is perfect, but I would like to show a banner above the cart page (only…
1
vote
1 answer

Local pickup custom percentage discount in WooCommerce checkout

I am using Local pickup shipping option custom percentage discount in Woocommerce answer code to make local pickup discount of 2% on Woocommerce. So people who choose to pickup their order get a discount on their total amount. This code is great,…
1
vote
1 answer

WooCommerce cart discount: one item free based on item quantity

I'm trying to implement a custom discount rule to the cart. Basically there is WooCommerce and the site is selling t-shirts. There is a current promotion that if you buy 3 t-shirts, you have to pay only for 2 and the one with the lowest price you…
1
vote
1 answer

WooCommerce product custom discounted price for logged in users

I have a question about managing prices in WooCommerce. I have a store only with simple products. Let's say that for all subscribers and customers the regular price of each product is discounted by 10%. This was easy: function custom_price(…
Joe Orfeo
  • 13
  • 5
1
vote
1 answer

Shopify enable discount code in url (every page) - NO REDIRECT

IN SHOPIFY STORE: How to add discount code in URL without redirect with javascript. Having a parameter in the url with the discount code.
gabrielepetteno
  • 89
  • 1
  • 11
1
vote
1 answer

Add a discount when defined products are WooCommerce cart

I am trying to set a discount for when BOTH products are in the cart no matter what other products are also in there. As of now, all it takes is one of the two within the array. add_action( 'woocommerce_cart_calculate_fees',…
user13860163
1
vote
1 answer

Deposit on backordered cart items in WooCommerce

I've taken this code from another post and basically this code is trying to force the cart price with a discount. What I want to do is force the discount only if the product is on backorder. So if product is on backorder, the client can order this…
GIOMGIO
  • 13
  • 2
1
vote
1 answer

Add discount per certain number of products on the cheapest products in WooCommerce

I'm adding the discount rule for every 3 products: 3,6,9,12,15.. on the cart and it should apply to discount 50% only the cheapest products. So if you have 9, only the 3 cheapest gets 50% off. This code applies a discount to all products, so it…
1
vote
2 answers

WooCommerce cart discount from second item on regular items only

I found this piece of code on stackoverflow, it does what i need, except that i need to apply -5€ discount for each products right after 2 products are added in the cart. Example: for 1 products in the cart the user will get 0€ discount for 2…
user832375
  • 89
  • 1
  • 1
  • 7
1
vote
1 answer

The formula for a function of output prices

This function displays the price in the front. {$product.price_amount}">{$product.price} How do I add a formula to this function that will allow me to output the result with a discount? For example, the amount currently displayed is 1000 $ It is…
1
vote
0 answers

How to identify transactions that were purchased during a sale or at a discount

I'm trying to develop a proof of concept and determine if this is technically feasible - If I purchase an item at a discount from its normal listed price (i.e. the normal full price is $20 but I bought it on sale for $15) from a retailer online or…
Matt
  • 57
  • 1
  • 9
1
vote
1 answer

calculate discount of prices in flutter

I want to try define below formula to calculate between old price and new price and show it on text widget but when i want to use it in an double variable i've got this error : "Only static members can be accessed in initializers" and this is what i…
Mehrdad Hosseini
  • 357
  • 1
  • 4
  • 17
1
vote
1 answer

show discount percent of product in Text Widget in flutter

I want to show amount of discount percent in Text widget in flutter, i used the Discount calculation formula but it didn't worked , How can i do that? this is what i want: Container( decoration: BoxDecoration( color: Color(0xfff40725), …
Mehrdad Hosseini
  • 357
  • 1
  • 4
  • 17