Spotlight: Diviguy’s Cloud Hosting Cost Calculator

See how Diviguy.com uses Advanced Calculation’s conditional formulas to tackle complex monthly cloud hosting pricing logic with ease.

Joe DiDomenico, AKA diviguy.com has a neat use case for Advanced Calculations: a pricing calculator that uses conditional formulas to calculate monthly software fees.

Joe’s client for this project is AMA systems, a provider of application and cloud services, who partners with Odoo to provide open source ERP and CRM solutions. With around 40 apps, Odoo’s offerings are vast.

odoo ama official partner header

How it works

AMA Systems wanted to replicate their pricing logic and build a pricing calculator on their own website that lets users get an idea of how Odoo’s pricing works. 

The pricing for one user is $46.60 per month, if self hosted or through standard cloud hosting. If users opt for a dedicated Odoo instance hosted by Odoo.sh, things get a bit more tricky. As a result, Joe needed to adjust the pricing based on each individual field (like total users), but at the same time, multiply the base total depending on the Hosting Type. 

price calculator indicating how cloud hosting owrks

Here’s exactly what Joe needed to calculate under the hood:

  • Users *$46.60
  • If Hosting Type = Odoo.sh add:
    • Processors: $57.60 for every 25 users
    • Storage: Users * $.20
    • Test Environment: $14.50

Then, display this as a monthly total.

To do this, Joe used Advanced Calculations, and specifically, conditional formulas. 

Depending on if the user selects Odoo.sh as their hosting provider, Joe’s formula will calculate another rate. Here are the formulas he uses:

if( F14 == 'Odoo.sh' ):

	ceil( F13/25 ) * 57.60

else:

	0

endif;
if( F14 == 'Odoo.sh' ):

	F13 * 0.20

else:

	0

endif;
if( F14 == 'Odoo.sh' ):

	14.50

else:

	0

endif;
F15 + F16 + F16

Advanced Calculations recently got a tune up for supporting more complex formulas. On top of supporting conditional statements, you can compare strings in calculation conditions, test for multiple conditions, check for empty (and non-empty) values, and more!

One other fun note — Joe used CSS to remove the submit button on his form and turn this into what appears as just a calculator tool, powered by Gravity Forms. We have a snippet that does exactly this, if you’re interested!

“Gravity Wiz support was amazing in helping me with some of the logic. Originally, this was going to be a form post, but the client decided to use just the calculator piece. It works exactly as required and the client and myself could not be happier!”


Thanks for sharing, Joe. Check out the calculator here, and feel free to learn more about AMA over at their website.

Comments

  1. Phil Ward
    Phil Ward October 26, 2024 at 2:56 am

    We love Advanced Calculations for our projects. Just built another with tiered membership rates and connection to GoCardless as payment provider. GravityWiz helped make this happen jwith the tools we needed and amazing support when needed.

    Reply
    1. Samuel Bassah
      Samuel Bassah Staff October 28, 2024 at 7:21 am

      Hi Phil,

      Thanks for your kind words. This sounds like an awesome project. We love to hear about the amazing things our customers are building with our products.

      Best,

    1. Samuel Bassah
      Samuel Bassah Staff October 28, 2024 at 7:18 am

      Hi Selmore,

      That’s great to hear. Feel free to get in touch via support if you have any questions, when you’re trying out the Advanced Calculations Perk.

      Best,

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.

Grab a bundle of free Gravity Forms plugins

Enter your email and receive our most popular free plugins and snippets, plus access to hundreds of others.

This field is for validation purposes and should be left unchanged.