Gravity Wiz

Magically enhanced tutorials, snippets and plugins for Gravity Forms!

  • Gravity Perks
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    • Documentation
    • Support
    • Account

Gravity Forms Conditional Pricing

Create flexible and powerful pricing levels for your Gravity Form Product fields based on conditional values in your form.

This plugin is part of Gravity Perks, a suite of 32+ essential Gravity Forms addons with support you can count on.

  • View All Perks
  • Buy Gravity Perks
View Demo

What does it do?

This plugin allows you create flexible and powerful pricing levels for your Gravity Form Product fields.

Save yourself the hassle and frustration of creating twenty different Product fields with different prices when what you really want is a single Product field with a variable price.

Gravity Forms Conditional Pricing can handle even the most complicated pricing variations with an easy-to-use interface for creating unlimited pricing levels per Product field.

Features

  • Pricing levels for Gravity Forms Product fields.
    Create an unlimited number of flexible and powerful pricing levels.
  • Intuitive interface for managing pricing levels.
    Manage Product pricing using familiar conditional logic rules.
  • Offer bulk discounts, pricing based on user input, and more!
    Build complex pricing rules without the headaches.
  • Improved performance.
    A single Product field replaces twenty Product fields containing conditional logic, improving site performance.
  • Integrates with Gravity Forms Conditional Logic Dates.
    Apply date-based pricing rules with Gravity Forms Conditional Logic Dates, also part of the Gravity Perks plugin suite.
  • Automatic updates.
    Get updates and the latest features right in your dashboard.
  • Awesome support.
    We’re here to help! And we mean it.

Documentation

  1. How do I enable this functionality?
  2. Feature Details
    1. Pricing Levels
    2. Pricing Rules
  3. Additional Information
  4. FAQs
    1. Can I show updated prices in choice-based Product fields?
  5. Known Limitations
  6. Hooks
  7. Related Articles

How do I enable this functionality?

After installing and activating Gravity Forms Conditional Pricing, you can create Conditional Pricing feeds for any Single Product, Drop Down, Radio Button or Hidden Product field. Let’s walk through that process.

Add a Product field to your form and click Update to save your changes.
Navigate to Form Settings > Conditional Pricing and select your Product from the Select a Product Drop Down.
Set the price and rules to qualify for this pricing level. Add as many pricing levels as you’d like and click Save Conditional Pricing to save your rules.
More details on pricing rules can be found in the Pricing Rules section.

Now that you know how to create pricing rules, let’s dive into what Conditional Pricing can do.


Feature Details

Pricing Levels

Pricing Levels consist of a price and a set of Pricing Rules that determine which pricing level should be used for the Product field’s price.

You can create an unlimited number of Pricing Levels for each of your Product fields. Levels can be rearranged by dragging and dropping them in your preferred order.

Pricing Levels
Pricing Levels use a first match policy, so levels with your strictest rules should be first.

Pricing Rules

Pricing Rules work just like Gravity Forms’ default conditional logic but instead of showing/hiding a field, the Pricing Rules determine which Pricing Level will be used to set the price of the Product field.

Pricing Rules consist of three fields:

  1. A list of all fields on your form that are available for conditional logic.
  2. A list of all the operators that can be used to compare the value of the first field with the value of the third input.
  3. The value to which the selected field will be compared. The format of this field will change based on the selected field type.
Pricing Rules

Just like conditional logic in other parts of Gravity Forms, you can add an unlimited number of rules to any Pricing Level by hitting the plus icon.

Pricing Rules

Additional Information

If you’re using Conditional Pricing with the WooCommerce Gravity Forms Product Addons, do not use the hidden-total class as recommended in their documentation. Instead add the gf_invisible class to achieve the same result.

FAQs

Can I show updated prices in choice-based Product fields?

We have a two-part snippet that will display prices in choice-based fields and update them when pricing conditions change. Follow these steps to use it:

  1. Paste this PHP snippet into your theme’s functions.php file.
  2. Add this JavaScript snippet to your form. We recommend using our Custom JavaScript plugin to make this part easy.

With the two snippets installed, prices for choice-based fields will automatically update as the user interacts with the form.

Conditional Pricing Updated Prices

Known Limitations

  • Gravity Forms does not have a reliable way to uniquely identify choices in choice-based fields. As such, pricing rules for individual Drop Down and Radio Button products are index-based. Removing or reordering choices in a Drop Down or Radio Button Product will corrupt your pricing rules.
  • Conditional Pricing does not support User Defined Price or Calculation Product fields.
  • Option fields are not currently supported.

Hooks

  • gpcp_after_update_pricing
Gravity Forms has hundreds of hooks. Check out our Gravity Forms Hook Reference for the most thorough guide to Gravity Forms’ many actions and filters.

Related Articles

  • How to Add Three Decimals with Gravity Form Currencies
  • How to Setup Early Bird Pricing with Gravity Forms
  • Conditionally Display a Field Based on a Recurring Date
  • How To Set Up Conditional Pricing with Nested Forms

Perk Deets

  • Version 1.2.42
  • Updated November 24, 2020
  • Released October 22, 2013
  • View Changelog

Changelog

1.2.42

  • Reverted fix made for reverted change in Gravity Forms 2.5. 😜
  • Improved support for Gravity Forms 2.5.

1.2.41

  • Improved UI of conditional prices in the Form Settings when using Gravity Forms 2.5 or newer.

1.2.40

  • Fixed issue where pricing rules based on Single Product Quantity were removed when editing pricing rules.

1.2.39

  • Fixed issue where deleted fields were not removed from conditional pricing rules.

1.2.38

  • Fixed performance issues with large number of pricing conditions.

1.2.37

  • Added support for using dynamically populated price as base price.
  • Updated French translation.

1.2.36

  • Fixed issue where a required flag on Single Product fields was not respected.

1.2.35

  • Fixed JS error where product was deleted from form but not removed from conditional pricing rules.

1.2.34

  • Fixed issue where slashes were stripped twice when saving pricing rules which created parse errors in the JSON when HTML attributes were present in field labels or rule values.
    • Fixed issue where errors parsing the pricing logic when saving resulted in a loss of pricing rule data.

1.2.33

  • Improved performance of Number fields using HTML5 spinbox.

1.2.32

  • Added support for importing multiple values from a single column (i.e value1,value2).

1.2.31

  • Fixed issue were field dependencies were not correctly identified and result in dependent fields not triggering a pricing update in some cases.

1.2.30

  • Fixed issues releated to new importer.

1.2.29

  • Added preliminary support for importing pricing levels; must be activated via filter. add_filter( 'gpcp_enable_importer', '__return_true' );

1.2.28

  • Fixed issue where pricing rules were not correctly validated when submitting from a source page of 0.

1.2.27

  • Fixed issue where Single Product quantity did not trigger pricing update when HTML5 was enabled and quantity was set via HTML5 spinbox.

1.2.26

  • Fixed issue where quantity validation was incorrectly bypassed for Single Product fields.

1.2.25

  • Fixed issue where Time fields did not correctly trigger pricing update.
  • Fixed conflict with GF where GPCP was overwriting format() function.

1.2.24

  • Fixed issue with WC GF Product Add-ons by changing default $formElem (where GWCP data is stored) to form wrapper rather than form element.

1.2.23

  • Fixed conflict with GP Conditional Logic Dates' "Current Time" option when configured with a pricing rule; caused JS error.

1.2.22

  • Fixed currency formatting issue introduced by Gravity Forms 2.1.2

1.2.21

  • Fixed issue when HTML5 was enabled; some field types did not trigger onkeyup conditional logic

1.2.19

  • Fixed issue where pricing rules based on Single Product quantities were not evaluated correctly due to a change in Gravity Forms

1.2.18

  • Fixed issue where Gravitate Encryption plugin caused products with pricing rules applied to fail validation
  • Minor refactors.

1.2.17

  • Fixed issue where quantity-based pricing rules would not evaluate quantities which included a comma

1.2.16

  • Fixed conflict with Better WordPress Minify; choking lack of semi-colon after regex pattern.

1.2.15

  • Fixed issue where saving form from Form Editor or Form Settings would overwrite changes made to conditional pricing rules when working in multiple tabs
  • Updated perk to use GP_Bootstrap

1.2.14

  • Fixed issue where if 3+ decimal currencies would incorrectly be rounded to 2 decimals when editing a pricing rule

1.2.13

  • Added 'gpcp_after_update_pricing' JS action to support doing something after prices have been updated See: https://gist.github.com/spivurno/aaf3d6a684b418edeeed

1.2.12

  • Fixed issue where single product quantity based conditional logic did not evaluate correctly when no other conditional logic rules were set

1.2.11

  • Fixed issue where multi-input fields with global pricing rules did not correctly fetch the correct base price when no matching pricing level was found

1.2.10

  • Fixed issue where deactivating GP triggers a fatal error

1.2.9

  • Fixed issue where pricing fields altered by conditional pricing did not trigger calculation fields dependent on them
  • Added French translation, thanks @jennybeaumont!

1.2.8.5

  • Removed safetynet.php dependency

1.2.8.4

  • Added better localization support

1.2.8.3

  • Fixed issue where Select-type Products with Placeholders enabled would offset the prices by one choice

1.2.8.2

  • Added support for debouncing updatePricing so it fires as few times as possible when change event is fired rapidly

1.2.8.1

  • Experimental improvements for speed, especially combined with calculations.

1.2.8

  • Fixed issue where comma-based currencies were treated as decimals when included in calculations; price was set on input-based Product fields as a number rather than a currency like GF does by default so 0.50 was converted to 50.00)

1.2.7

  • Updating pricing script to call updatePricing more efficiently; now only triggered when either the product field itself changes or a field on which the product is dependent changes

1.2.6

  • Fixed issue where infinite conditional logic loop was triggered when setting conditional price (caused by differences in previous value vs new value due to price formatting)
  • Updated pricing rule editor to display price in a currency-specific number format instead of always as a decimal (i.e. euro => '1.250,50' vs '1250.50')

1.2.5

  • Fixed a bug where file uploads were not saved due to field values being cached when temp entry object was created

1.2.4

  • Fixed issue where the price of product fields modified via conditional pricing was not correctly reflected when included in GF calculation fields

1.2.3

  • Fixed issue where in some cases, the total input value was updated but the total text was not. Resolved by preventing total input's change event from triggering the updatePricing method.

1.2.2

  • Fixed stack overflow issue caused by new change event on GF's Total field
  • Miscellaneous improvements

1.2.1

  • Fixed issue where pricing adjustments were not correctly applied to some GF payment gateways due to order of events

1.2

  • Updated to be Gravity Forms 1.9 ready!
  • Fixed bug with conditional pricing levels where fields were not correctly populated into field select
  • Updated styling to better match WordPress 4.0
  • Update readable pricing rules to include word-based operator labels (i.e. ">" became "greater than")
  • Updated readable pricing rules to truncate field labels
  • Updated product select with max-width (prevents huge select for large product labels)
  • Fixed issue where pricing levels for individual radio button products were not applied correctly
  • Fixed issue with UI where an error was returned when selected value was undefined when generating custom quantity inputs

1.1.1

  • Fixed issue where pricing rules based on fields hidden by conditional logic would match incorrectly

1.1

  • Added export functionality; pricing rules are now exported/imported with the form
  • Updated: "Admin only" product fields are no longer eligble for conditional pricing
  • Updated minimum Gravity Forms version to 1.8.8; required for new export functionality

1.0.1

  • Fixed a notice in validate_submission() method where GFFormsModel::get_field_value() returned array

1.0

  • Added documentation
  • Let's do this!

1.0.beta3.2

  • Fixed issue where "WooCommerce - Gravity Forms Product Add-Ons" variable pricing selects were generating a JS error

1.0.beta3.1

  • Fixed issue where "WooCommerce - Gravity Forms Product Add-Ons" quantity input was generating a JS error

1.0.beta3

  • Fixed conflict with "WooCommerce - Gravity Forms Product Add-Ons" plugin

1.0.beta2.3

  • Fixed issue where conditional_pricing_menu_item() failed to check if a valid $form was being sent to the has_product_field() method
  • Updated validate_submission() method to force a validation failure if price did not match; also made function much easier to read

1.0.beta2.2

  • Fixed issue where having a "global" rule on a multi-product field was not playing nice when a product-specific rule on a multi-product field was applied

1.0.beta2.1

  • Fixed issue where single product rules in drop downs were not being validated correctly

1.0.beta2

  • Added $version property
  • Updated JS object from GWTieredPricing to GWConditionalPricing
  • Added GWConditionalPricing.pricingIteration to support more performant usage of the "gpcp_pricing" filter
  • Added form ID parameter to GWConditionalPricing.setPrice method
  • Fixed issue where price passed by reference in "gpcp_pricing" was causing issues
  • Updated several methods of GWConditionalPricing to be static

1.0.beta1.3

  • Fixed issue where custom quantity was not working in some cases
  • Added 'gwcp_price' JS filter

1.0.beta1.2

  • Fixed issue where cond pricing rules applied to multi-product parent failed to reset invidual products to correct base prices

1.0.beta1.1

  • Updated so calculation and user defined price fields no longer appears as options for conditional pricing
  • Fixed issue where conditional_logic.js was not included and initialized
  • Updated minimum GF version to 1.7.6.3

1.0.beta1

  • Major update with various UI and functionality improvements in preperation for beta launch

0.9.7

  • Replaced deprecated .live() calls to .on()
  • jQuery UI is now only loaded on the GP Conditional Pricing Settings page
  • Changed drag cursor to only display when hovering over a single pricing level
  • Fixed an issue where the sorting was not being saved in the correct order

All Perks

  • GF Auto Login
  • GF Better User Activation
  • GF Blacklist
  • GF Conditional Logic Dates
  • GF Conditional Pricing
  • GF Copy Cat
  • GF Date Time Calculator
  • GF Disable Entry Creation
  • GF Easy Passthrough
  • GF eCommerce Fields
  • GF Email Users
  • GF Expand Textareas
  • GF File Upload Pro
  • GF Limit Checkboxes
  • GF Limit Choices
  • GF Limit Dates
  • GF Limit Submissions
  • GF Live Preview
  • GF Media Library
  • GF Multi-Page Navigation
  • GF Nested Forms
  • GF Pay Per Word
  • GF PayPal One-time Fee
  • GF Placeholder
  • GF Populate Anything
  • GF Post Content Merge Tags
  • GF Preview Submission
  • GF Price Range
  • GF Read Only
  • GF Reload Form
  • GF Terms Of Service
  • GF Unique ID
  • GF Word Count

Copyright © 2021 · Powered by WordPress · Gravity Wiz LLC

  • Support
  • Affiliates
  • About
  • Sitemap
  • Gravity Perks
    ▼
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    ▼
    • Documentation
    • Support
    • Account