-
muhammadarsaaaalan1122Asked on March 26, 2025 at 12:42 AM
Subject: Applying Discounts Based on Selected Quantity in Product Listing
Hi Jotform Support Team,
I have 300+ products that I want to list using the Product List element. I need to apply automatic discounts based on the total quantity of selected items, with the following rules:
- Buy 2 items → Get 20% off
- Buy 4 items → Get 50% off
Is it possible to set up such a discount structure within Jotform's Product List? If not, is there an alternative way to achieve this using calculation fields or conditional logic?
Looking forward to your guidance. Thanks!
-
Lara Jotform SupportReplied on March 26, 2025 at 5:03 AM
Hi Muhammad,
Thanks for reaching out to Jotform support. Currently, there's no direct way to apply discounts based on the number of items selected. As a workaround, we can use other form elements like the Input Table to list products, set up a form calculation widget to count the number of items selected and use conditional logic to calculate the total and apply the discounts accordingly.
First, let's add and set up the input table:
- Open Form Builder, click on Add Element and look for Input Table, then drag it to your form.
- Set up the rows and columns to represent your product and the options they can select, such as quantity.
- Click the gear icon to open Field Properties, then under Fields, change the Input Type to your preference (e.g., Dropdown).
- Scroll down and add your preferred dropdown options.
- In Form Builder, click on Add Element from the left side of your screen.
- Under Widgets, find Form Calculation and drag it twice into your form (one for total quantity and one for total price).
- Click the wand icon next to each widget and set up the formulas accordingly.
- Click Save to apply the changes.
Now, let's set up the conditions:
1. In Form Builder, in the orange navigation bar at the top of the page, click on Settings.
2. Click on Conditions on the left of the page.
3. Now, click on Add a New Condition and then click on Update/Calculate Field.
4. Set the conditions like you see below:
Calculate Base Price:
Calculate Discount:
Lastly, let's add a payment gateway:
- In Form Builder, under Form Elements, go to the Payments tab.
- Find your preferred payment gateway and drag it into your form.
- Change the Payment Type to User Defined Amount, then select the Total Price Field as the Get Price From source.
- Set up your credentials and click Save.
Give it a try and let us know how it goes.