Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

Issue with Stripe Promotion Code "First-time Order Only" Restriction and Guest Customers

I am using Stripe’s promotion code functionality and have created a code with the "first-time order only" restriction to incentivize new customers. The purpose of this restriction is to ...
com m's user avatar
  • 1
1 vote
1 answer
42 views

Show total savings amount in WooCommerce cart and generated order

I am using the following code to show the total savings amount in checkout page: add_action( 'woocommerce_review_order_after_order_total', 'show_total_discount_cart_checkout', 1000 ); function ...
Krashkat's user avatar
0 votes
0 answers
80 views

Woocommerce order products by discount percent %

I am try add a filter on woo commerce category view, to order products by discount percent. I found and adding this nice code from internet, for function.php: add_filter( '...
Hector Solutions's user avatar
1 vote
1 answer
68 views

Apply discounts grouped by product category to Woocommerce Cart

I need help with a code for Woocommerce. I need to add a discount for each selected category in each product, and group it by each category: For example: I have 3 categories: Category 1 -> ...
Jorge Rey's user avatar
0 votes
0 answers
19 views

Prestashop 8 is not calculating the discounts correctly

Prestashop is not calculating the discounts correctly. I have 3 cart rules established in such a way that they are 5% discount if it exceeds $1000, 2% more discount if it exceeds $2000 and 3% discount ...
Arturo Vasquez's user avatar
0 votes
0 answers
33 views

Need to combine Shopify product line_item with free discount

$data = [ 'price_rule' => [ 'title' => $point.' off', 'value_type' => 'fixed_amount', 'value' => ...
Princy Pariya's user avatar
1 vote
1 answer
74 views

Displaying a promotional price for specific user role in WooCommerce

in the online store, I want to introduce a % discount for a specific group of customers. I have already created a new group and customers and added the code below, which gives a discount to the cart. /...
Patryk Banach's user avatar
0 votes
0 answers
47 views

Discount Code Mutation not Reflecting in Dawn Theme UI

I'm currently using a GraphQL mutation within the Shopify Theme to apply a discount code and automatically update the cart.json. While the cart.json is successfully updating with the applied discount, ...
Anu's user avatar
  • 33
0 votes
0 answers
45 views

Discount on optional products or product bundles in odoo v17

Is there a possibility that the customer pays less if he adds an optional product or can I create bundles or combinations in ecommerce in odoo v17? So you buy a French fries for 4€ and if you add the ...
Constanze Becker's user avatar
0 votes
1 answer
33 views

Rstudio monthly discount factor interpolation for data table

How can I have a linear interpolation on the column DF in order to replace the 0 with a "weighted amount" obtained combining 0 and 0.98 for the first 11 records and 0.98 and 0.95 for the ...
highbury's user avatar
  • 159
0 votes
0 answers
55 views

Shopify: Automatic Discount Detail On Product Detail Page

I have created automatic discounts as special offer and I want to show it on product detail page. I don't want to perform any calculation but wanted to notify customer that if they are buying the ...
Rajen Ghorecha's user avatar
0 votes
0 answers
16 views

Implementing Discount Feature with Usage Limitation for Logged-In Users in wordpress [duplicate]

Discount Feature Implementation: I'm currently working on implementing a discount feature on my website. I want to provide users with a discount, but with a limitation: each logged-in user should only ...
ABDELILAH BENCHIOUI's user avatar
0 votes
0 answers
78 views

Apply a variable discount woocommerce

I am using Woo Rules Pro but i cant find a solution with it My Issue is that i have several products that have a regular and a sales price (example Product X1 regular price is 100 and now the ...
Mr Kabu's user avatar
-3 votes
1 answer
76 views

double discount in percent [closed]

I have a script for calculating discounts in percent, then I want to add a second discount, what is the script formula? <td>Rp<?= number_format((($r->jual * $r->jumlah) - ($r->jual*$...
riqtarunk's user avatar
0 votes
1 answer
168 views

Change WooCommerce cart item tax rate based on the item discounted price

I want to calculate the tax based on the item price after discount. I have two tax rates: 5% GST and 12% GST. For products with price after discount that is less than 1000, I want to apply a tax rate ...
Prashanth Gowda's user avatar
0 votes
1 answer
65 views

Discount product price, auto add free product for specific user role in WooCommerce

I have a WordPress site where I have a "Premium" user role. I want all users with this role to get a 10% discount on Wall pictures and free candles. I want the discounted price to be ...
Simen's user avatar
  • 85
0 votes
0 answers
126 views

Disable sale price on Subscription price. WooCommerce Subscriptions & Woo Discount Rules plugin

I have subscriptions applied to most all products on my website. My issue is, when an item goes on sale, the subscription price is based off the sale price at checkout instead of the regular price. ...
avidart's user avatar
  • 11
0 votes
0 answers
56 views

Adding Feature for 15% Discount on First 3 Trips in WooCommerce

How to modify my existing code to achieve the following: Apply a 15% discount only for the first 3 instances of a specific product (ID: 848) for each logged-in user. add_action('...
ABDELILAH BENCHIOUI's user avatar
0 votes
1 answer
275 views

WooCommerce adding a discount based on payment method on Checkout Screen

I'm trying to add a discount for 'cheque' payments in my WooCommerce store but the WC()->session->get('chosen_payment_method') command isn't working as expected. I can add a discount ...
josephhartman82's user avatar
0 votes
0 answers
28 views

how to modify function to account for technology specific discount rate

I need to modify this function so that it can deal with a discount_rate that is now defined for all technologies while before it was equal for all technologies. This is the original function: `def ...
giovanni andrean's user avatar
1 vote
1 answer
84 views

Auto apply coupons based on Woocommerce cart subtotal thresholds

Trying to apply a coupon automatically to WooCommerce checkout. Have tried a number of snippets, but can't seem to get it to work. It either throws critical errors, or does not apply the coupon ...
Phi Cao's user avatar
  • 13
0 votes
0 answers
82 views

How discount factor is taken into account in stable baselines 3 on policies methods i.e. PPO?

I would like to understand how gamma have an impact on the learnt policy. I cannot understand if the final reward has a linear or an exponential discount. I would expect the final reward to be ...
nrg's user avatar
  • 1
0 votes
1 answer
89 views

Update the price in cart from additional custom discount rate percentage

I would like to change the product prices. This is what I have tried: function regular_price_func($price, $product) { if (!empty(get_field("zusatzlicher_rabatt", 'options')['...
xRay's user avatar
  • 799
1 vote
1 answer
108 views

Change WooCommerce cart item price based on quantity discount for a category

I need certain items to have a mix and match quantity discount based on category. I have seen some other codes that accomplish this using an overall discount at the bottom of the cart, however I need ...
AlexTSF's user avatar
  • 113
-1 votes
2 answers
1k views

Temporary global sale price discount for all products in WooCommerce

What I need: We are planning to start a campaign. We want to give a temporary 10% discount on every product we sell on our site for the next 30 days. We want to display both the regular price and the ...
sotirov's user avatar
  • 352
1 vote
1 answer
113 views

Quantity discount based on product radio buttons in WooCommerce

In my theme's functions.php file, I added the following code snippet, that adds a small discount based on quantity, for a specific product which name contains "Hydrogel". However, it don't ...
GFT's user avatar
  • 62
0 votes
0 answers
28 views

Discount Combination Field Is Missing

Discount Combination Field Is Missing Why does the discount combination field not exist? Screenshot I cannot find any settings to enable/disable discount combinations... Is this a Theme issue? Thanks ...
Janos Pantli's user avatar
0 votes
3 answers
911 views

WooCommerce discount: add negative fees without taxes

I am adding a WooCommerce cart fee like so : add_action('woocommerce_cart_calculate_fees', function($cart) { $cart->add_fee(__('Popust za vjernost'), -10, 0); }); I thought adding a 0 ...
franka's user avatar
  • 45
0 votes
1 answer
233 views

WooCommerce after cart validation apply a voucher code as coupon discount

I'm building some functionality in WooCommerce that allows users to input an externally generated voucher code when adding a product to the cart. This voucher code is then checked to see if it's been ...
Paddy Winsley's user avatar
2 votes
1 answer
83 views

Quantity discount of one free product in WooCommerce

I have three products that I want to give as a free item. If anyone adds more quantity from an item I want to give only one quantity as free. That means deducting price of one quantity from the ...
Shahadat Hossain's user avatar
1 vote
1 answer
74 views

Product page custom checkbox enable a percentage discount on WooCommerce cart subtotal

The goal is simple, add a checkbox to the WooCommerce Product Page. If the user checks the checkbox, a 5% discount is applied on cart subtotal. I have checked and doubled checked the code like ten ...
Learning WooStoreFront's user avatar
1 vote
1 answer
126 views

Add a discount on undiscounted items with specfic attribute value in WooCommerce

I am trying to exclude any products where any coupon code is applied, from my custom discount code, on the checkout page. In my code, I am applying a discount to the order when x amount of products ...
Richard's user avatar
  • 392
1 vote
1 answer
301 views

How to apply discount on variable and single products, based on cart quantity and product attribute in WooCommerce?

I am trying to apply a percentage discount based on quantity of products with a specific product attribute, in cart. More precisely my goal is to apply 15% discount on orders of minimum 6 products ...
Richard's user avatar
  • 392
-2 votes
1 answer
124 views

Site Wide Discount Woocommerce [duplicate]

Looking for a script that applies a discount to every product in my woocommerce store So every product no variables, just 10% off everything. And it shows the regular price, then the sale price with ...
FoamyMedia's user avatar
1 vote
1 answer
276 views

Custom WooCommerce checkout fields interactions adding discounts

I need to add three checkout fields in WooCommerce checkout: A checkbox labelled "I'm already a member". Checking this will display a field below the checkbox where the person must fill in ...
Inger's user avatar
  • 13
1 vote
1 answer
213 views

Discount rules in WooCommerce excluding categories with user roles conditions

I use this code which gives customers a discount based in speific amount ranges that generates discount of 2% 4% 6% for regular buyers and 3% 5% 7% for customers with the role "vip". The ...
Boggie's user avatar
  • 75
1 vote
2 answers
370 views

Discount for specific shipping methods in WooCommerce checkout

I like to give a discount on some Local Pickup shipping methods. With the code below, I get a discount on all shipping methods (including also Flat Rate and Free Shipping). But I would like this ...
Mike de Geus's user avatar
1 vote
1 answer
96 views

How to retrieve the product variant ID that a specific discount code applies to

How can I retrieve the product variant ID that a specific discount code applies to using Shopify GraphQL? This is my GraphQL query const query = `query codeDiscountNodeByCode($code: String!) { ...
icingonthecake's user avatar
1 vote
1 answer
58 views

WooCommerce discount for unlogged users based on if a field has any input add 10% discount

I would like to give 10% discount for companies (B2B) but I don't want to give discount for individual person (B2C). The only way to check if somebody (not logged in) is an individual person or a ...
Antal Szabó's user avatar
0 votes
1 answer
109 views

Give Site-Wide Discounts for Current Active WooCommerce Subscriptions Subscribers

I'm running a site that has a cookie subscription business. If a customer is already an active subscriber I'd like any additional products purchased to be half price (since they're shipped together). ...
Jamie Kidd's user avatar
-1 votes
2 answers
445 views

Create a discount rule for WooCommerce with 50% off on fourth product (the cheapest one) [closed]

Hy, I want to create a discount rule for WooCommerce with 50% discount on fourth product (the cheapest one). So if I have at least 4 products in my cart, I want to have a 50% off on the one with the ...
Sorin's user avatar
  • 3
0 votes
1 answer
75 views

How to calculate regional discount for some product in PHP?

So I was asking ChatGPT about the regional discount. First about places where to get "cost of living" and "average salary". I've created a small JSON file with data from Numbeo. ...
jcubic's user avatar
  • 65.7k
0 votes
0 answers
382 views

Shopify discount and price rules access scopes. How to request them to Shopify? Where to get them to fetch discounts and price rule data?

I am trying to create app for my client. The client has website based on Shopify. I want to show the discounts the client has created on the website to show up on app. I went through Shopify API ...
Sushant Somkuwar's user avatar
0 votes
0 answers
118 views

Check if product with category "A" is in the cart and apply a 10% discount to all products with category "B" in the cart:

I'm trying to add a 10% discount to all products that fall into category B when a product from category A is in the cart, this is what i've tried so far and from what I see there's not an obvious ...
Richard Mišenčík's user avatar
0 votes
0 answers
40 views

The new price does not appear

I have two tables: products (which has price_before and discount_id) and discounts (which has discount_value and discount_id) and I want to show the products with the new price. This is my query in ...
Rama Eisawi's user avatar
1 vote
0 answers
692 views

Google Play Console subscription Percentage discount offer

Adding a discount offer to the yearly subscription doesn't seem to be working. The billing dialog still shows the full price. I have set up a yearly subscription. I want to give new subscribers a 20% ...
tcox's user avatar
  • 126
-3 votes
1 answer
407 views

Can anyone help me out with discount coupons in Django?

Currently I am working on a E-Commerce Website, I Need to Implement these Offers on add to cart as the Products are being added, the Price should be discounted according to the Offer Provided. The ...
Mr_developer.'s user avatar
0 votes
1 answer
922 views

How we display discount percentage badge and sale badge separately on WooCommerce product?

Want to display discount percentage badge on right hand side of product image and sale badge on left hand side of product image in products slider. So, Please Suggest some hooks for this functionality!...
Diksha Saini's user avatar
-3 votes
1 answer
61 views

woocommerce cart qty discount for shipping

Shipping discount. this there away to offer 50% discount on woocommerce shipping when you have 3 or more items in the cart? eg product 1
user3408291's user avatar
0 votes
1 answer
76 views

Changing unit price for different quantities

I have this price calculator where the price for each item is 2. I need the price to be 1.8 if the quantity is over 1000. In another condition it also could be treated as discount, for example if the ...
Dontheman's user avatar

1
2 3 4 5
9