Personalize selling with product rec quizzes 👉

Get free ebook
Signup

Create an order form and shopping basket with Branching and calculations

You can design your own custom shopping experience with Typeform by combining Calculations and integrated Stripe payments (the Payment question).

Your customers make their selections, the ‘Price’ variable increases or decreases depending on their selections, and the Payment question is automatically ready with the right price at checkout.

You can read more about order forms, and try out our ready-made example forms here.

Here’s an example form with a shopping basket:

And this is what the Branching and calculations settings look like from the example above.

2024-07-18_12-10-28.png

HC_Warning_ilu_cropped.png
Warning! Note that the Price variable will not be visible until you add a Payment question to your form!

Setting an initial value for the Price variable

Before any questions have been answered, the Price variable can be given an initial value.

The initial value would be 0 (zero) if you want to do a straightforward shopping cart which adds up the total price for all items selected. But you can also use Calculator to apply a discount, for example, decreasing the price from its initial value. You could also use this option to apply a delivery charge, if you like.

You can set the initial value for the Price variable on the Question settings screen for the Payment field:

2024-07-18_12-17-21.png

Let customers choose quantity

Use a Number question to ask your customers for quantity, and then let Branching and calculations work out the total price.

1. Add a Number question, and write your text.

2024-07-18_12-17-48.png

2. Then go to the Logic panel, select Branching and calculations, and set up the Logic like this.

2024-07-18_12-12-36.png

Choose Multiply from the dropdown menu, so that whatever number customers answer, the total price is multiplied by that amount.

Discount coupons

Let’s say you’re selling an eBook which retails for $9, and you want to enable the coupon code “earlybird” which will reduce the price by $2 to $7. Once set up, people need to enter a coupon code that exactly matches this otherwise the price reduction won’t be applied.

Discount coupons can be set up by using Branching and calculations with a Short text field, like so.

2024-07-18_12-14-07.png

You can also create coupons with percentage discounts by multiplying the price variable. For example, to give a 10% discount, you have to multiple the price by 0.9, for a 20% discount by 0.8, and so on.

2024-07-18_12-15-42.png

Tap into our community knowledge