Blog

Changing the Product Quantity

Posted by:

You are here:
< Back

By default your customer can define how many items he wants to order using the quantity box

If you want though you can change this using the price type “Product Quantity”

Using this price type will make this field to automatically update the quantity with whatever is selected in the field

Notice how the quantity is updated every time the slider change, you can also hide the quantity box if you want

Using Formulas

You can even do arithmetical operations to calculate the quantity needed. For example lets say that you sell tiles, each tile is 30cm². Instead of making your customers calculate how many tiles they will need you could do the math for them like this:

1.-Add a numeric field where user will define the area they want to cover with your tiles

2.- Add a hidden field and use the price type “Product Quantity”

3.- Click in the calculator icon inside the value setting

4.- Define your formula. In this case the formula should be area*100/30 as each of our tiles is 30cm²

This formula could give decimal numbers and we can’t sell half of a tile so we need to round up the number using the function RNF_Ceil

And that’s it! now the quantity will be automatically calculated

0

About the Author:

Im programmer working for an international company. I have programmed since i was 12 and i have done it professionally for 6 years. Programming for a company is fun and i have learned a lot of things but i have always been interested in running my own business so i decided to give it a shot doing what i do best, programming stuffs.
  Related Posts
  • No related posts found.