Create an order form and shopping basket using Calculator

You can design your own custom shopping experience with Typeform by combining Calculator 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 typeforms here.

Here’s an example typeform with a shopping basket:

And this is what the Calculator settings look like from the example above:

Screenshot showing Calculator settings for order 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 set the initial value for the Price variable on the Question settings screen for the Payment field:

Screenshot showing how to add a preset amount to the Price variable

Let customers choose quantity

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

1. Add a number question, and write your text:

2. Then click the Calculator icon, and set it up like this:

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.99, and you want to enable the coupon code “earlybird” which will reduce the price by $2.99 to $7.00. 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 Calculator with a Short text field, like so:

Screenshot showing how to set up coupon codes in an order form