Please Note: We are no longer using forums to facilitate standard support. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Calculated Pricing

  1. jschulbe

    What I am trying to achieve is calculated pricing based on square area for both rectangular shapes and a circle. The person would choose what shape they want then they would get a text box for Length and Width or a Diameter to type in the chosen dimensions they need.

    Everything we do is a custom dimensions and our entire price is based off of square area.

    So for a Rectangle

    L * W = Area
    Area * Price per square mm = Total Price

    For A Circle

    d/2 = r
    Pi * r *r = area
    Area * Price per square mm = Total Price

    Then Lastly the person can choose the quantity of the product they want and the price will adjust accordingly.

    I know this feature is being added into the core plugin in the future but I cannot wait until that is done. If someone has done this with GF could you please point me in the right direction in how to accomplish this.

    Thank you,

    Posted 3 years ago on Tuesday February 14, 2012 | Permalink
  2. I have forwarded this forum post to one of our developers who will take a look and provide you some guidance. I'll touch base with him and see if he can do so tomorrow.

    Posted 3 years ago on Friday February 17, 2012 | Permalink
  3. jschulbe

    Thank you for forwarding this to your developers.

    Posted 3 years ago on Friday February 17, 2012 | Permalink
  4. Hi jschulbe,

    Unfortunately, there is no pretty way to handle this, but a good way to get started is this walk through:

    This will demonstrate how you can modify the order total both on the front end and the back-end. With a little more effort, you could use this same method to add on whatever additional fees you need to based on the width and height of the product.

    On the front end, you'd want to retrieve the values of the height and width field via jquery.

    var width = jQuery('#input_1_2").val();

    You can then do your calculation and add the amount to the form total.

    On the back-end you will need to to retrieve the width and height values from the $entry object which is passed from the gform_product_info hook (refer to the Tax example above). Again, you can do your calculations to get the amount to add. On this step though you can add it to the product total rather than just the form total.

    I hope this makes sense. It is a fairly involved process.

    Posted 3 years ago on Friday February 17, 2012 | Permalink
  5. jschulbe

    Hi David,
    This is a good start, hopefully i get this to work within the week.

    Thank you,

    Posted 3 years ago on Monday February 20, 2012 | Permalink
  6. Our new GF v1.6.4 Beta 1 was released today with calculations - see if that works for what you are trying to do:

    Posted 3 years ago on Wednesday April 11, 2012 | Permalink

This topic has been resolved and has been closed to new replies.

Support Tickets

Open A New Support Ticket
 Open A New Priority Support Ticket *

* Developer license holders only