Pricing by RANGE of Square Feet

OK - Need Some Help Here.

Let’s say you have a product that you sell by the Sq/Ft. Lot’s of things like this.
Let’s say it’s a swimming pool.
The Base Price is $100 per sq ft. So I have 2 fields that length x width = SqFt

Now I can take (Base Price $100) x SqFt ALL THIS IS EASY AND STRAIGHT FORWARD.

But let’s say that the base price per sq ft goes down as the size of the swimming pool increases.

What’s the best way to accomplish this if;

If the Swimming Pool is 10 Sq Ft then the base price is 100 per sq ft.
If the Swimming Pool is 11 to 20 Sq Ft the base price is 90
If the Swimming Pool is 21 to 40 the Sq Ft base price drops again to 75
and if the Swimming Pool is > 40 Sq Ft then the price is 50 per Sq Ft

I was thinking of using a condition and the range but just not sure how to get the middle numbers working. The < and > are easy for the lower and the higher but what when the Sq Ft is between 11 and 20.


Hey @mikebhobbs - a good approach when you’re building something like this is to define “tiers” in your database.

You can think of each tier as a breakpoint: when a certain criteria is met, then it bumps to the next relevant category. As you construct the table, you would have the fields of:

  • tier name (something to make it recognizable)
  • square footage (number range, ex. 100sq ft to 199.99sq ft, etc).
  • tier base price

You could build out granularity based on dimensions if you wanted to kick into different tiers based on that.

To tie it together, you have an input on the page that computes the overall square footage. Then do a search for tier’s where square footage contains the computed value. Then multiply as necessary based on the returned tier.

Just add two conditions joined by and. For example:

  • Sq ft > 10 and Sq ft < 20


That’s kinda what I was trying to do? Seems like I’m close, however I’m kinda intrigued by dan1’s suggestion above.

Give it a try and I’d be happy to take a look at what you come up with. It’s a bit more nice in a dynamic sense - ie. if you want to create an end-user dashboard where an admin can adjust pricing/ranges, etc. without having to go into the Bubble editor.

@dan1 - Ok so I’m working through this on the table side I selected “Numeric Range” but how do I enter the 2 numbers it won’t let me add that?

FWIW, Dan’s approach is the same as I was suggesting. He’s just also referencing the values from the database for an added degree of flexibility.

My advice: if you’re having trouble getting anything to work in Bubble, start with the 1-step solution to reduce scope and complexity. So, in this case, start with the hard-coded values. Once you get that working, then feel free to then add dynamic references to the database.

@sridharan.s - Thanks for the suggestion. I was trying to avoid 30 different conditions in the hard coding just incase the end user does need to modify a price level. My app is progressing nicely over the last year and a half, so I’m not new to Bubble I just turn here when I get stuck. This is the only part of my app that right now has me stumped. @dan1 It looks like the “numerical range” is only used for the slider, is that right?

This topic was automatically closed after 70 days. New replies are no longer allowed.