Need quantities in cart to round to nearest sellable amount

Hello! We are going to be selling tiles on our ecommerce site. However, the customer inputs how many square feet of tile they want, and we would like the quantity to round to the nearest tile.

– for example, if a tile is 5’x10’, we only want them to be able to enter quantities in multiples of 50, or to round up to the nearest multiple.

Some of our tiles are 8"x68", some are 12"x24", 24"x48", etc. So it would have to change with the tile they choose.

Is this possible?

Thanks in advance!

Wow that is some large tile. What would you use that for? However, for what you are trying to achieve, is no simple task. This would be creating custom code with a calculator script that reflects how many tiles are needed for the size of the space.

@webdev @matthewpmunger @PeterDimitrov is this something you guys can help Vivian out with?

1 Like

Hey @VvNK, welcome to the community!

While it’s not possible on the fly to update the pricing information in the add-to-cart button, I did find this embeddable tile construction widget that you could put on the product pages to allow customers to make an informed purchase. Providing a calculator like this should help customers feel confident in the quantity that they order.

Scroll down the page to where it says “get the widget”, customize the options, and use the embed component in Webflow to add the code into your site’s pages.

Hope this helps. Happy designing!

1 Like

Thanks for your help! The super sized tiles are usually used for countertops or for shower walls, so that you can do an entire wall in one tile (no grout, yay!).

Thank you for searching for that for us! While that would help customers calculate what they need, it’s not quite the issue we’re having.

On our site, you purchase by the square foot. Let’s say you have an 8’x8’ room (64sqft), and they want to use the 5’x10’ tiles. They would (and can) type in 64sqft, and they’d pay for that.

That’s 1.28 tiles. Right now, they would be able to make that purchase, but we need to sell them in multiples of 50sqft. They would need to purchase 100 sqft (2 tiles) to cover 64sqft.

Does that make sense? If so, is it possible to code this in? We would be happy to pay someone to figure that out for us.

Thanks again, you’re all great!

I think I have a solution for you. Need more info about your business requirements. Feel free to PM me.