1. Help
  2. Advanced
  3. Create scores
  4. Shopping basket: Multiply by quantity selected

Shopping basket: Multiply by quantity selected

Want your customers to be able to select from different products and quantities in a shopping basket?

Branching and calculations is equipped with Multiply and Divide to help make life easier. You can also do calculations on Number questions, making a shopping basket easy-peasy to set up.

In this article, we’ll explain how to use these functions to create a checkout for a shopping cart that adds up the price based on the quantity of a single product that a customer selects.

Let customers choose how many items to buy

You can create a checkout that calculates the total price a customer needs to pay based on the quantity of a particular item they want. Check out this example we created using plane tickets, then read on to find out how we made it:

How to make it

1. Add a Picture Choice question that lists your items, each with a predefined price:

Screen_Shot_2021-06-08_at_4.42.27_PM.png

Turn on Multiple selection in Question settings if you’d like people to choose more than one destination:

Screen_Shot_2021-06-08_at_4.43.33_PM.png

This won’t change the following calculations!

2. Go to the Logic panel and select Branching and calculations under the Simple tab. Click Add logic to start adding your calculations and add the corresponding amount to the price variable of each product.

Multiply_3.png

HC_Warning_ilu_cropped.png
Warning! Make sure to choose Price (not Score)! You’ll need to add a Payment question to the typeform for this to appear as an option.

3. Add a follow-up Number question asking the user to confirm the quantity. You can use Recall Information to show the answer to question 1 and to display the chosen destination in the question:

Screen_Shot_2021-06-08_at_4.45.16_PM.png

4. Now go back to the Logic panel, select Branching and calculations under Simple, and set up your calculations up to multiply the price variable by the answer to this question:

Screen_Shot_2020-11-10_at_5.49.38_PM.png

5. Add a Payment question, and make sure you set the Price to 0 (zero):

Screen_Shot_2021-06-08_at_4.46.09_PM.png

And that’s it! Here’s what the final typeform looks like with a nice theme from the Design panel:

Screen_Shot_2021-06-08_at_4.50.52_PM.png

Tap into our community knowledge

Find Answers
Contact Support