In addition to products he offers, another client offers subscriptions to his customers. Gold, Silver and Bronze subscriptions give his customers discounts of 45%, 30% and 15%, respectively on each of his products. Anyone can purchase his products, but only his subscribers get special pricing.
There are a couple of things that need to be in place for this to work:
- In order to keep track of the subscription level that a customer belongs to, we have to take a step back. At the point that a customer wants to order products, s/he must declare how they want to proceed – as a non-subscriber, or as a subscriber at a particular level (Gold, Silver or Bronze). Once that decision is made the user is registered via GF's User Registration Add-on. It's in this add-on that we can specify the customer's membership level be recorded in the User Meta data. I add a Custom Meta field called ‘Membership_level' and I set its value to the ‘What membership do you want to buy' field. One point that may not be obvious is that if the customer elects not to purchase a membership, but to instead continue as a non-member, the ‘Membership_level' user meta data still has a value: in this case, it's blank.
- For any of his customers to order products from my client, the customer must be logged into their account so that their membership level can be retrieved.
With those two tidbits explained, we can continue with setting up GF Conditional Pricing.
To set the conditional pricing logic, you must first add a product field to your form, and only then will you see the Conditional Pricing menu item in the form settings menu.
Once you're on the Conditional Pricing settings panel you can choose the product field for which you want to set conditional pricing from the ‘Select a product' dropdown.
From here, this looks very much like the typical conditional logic fields on most GF fields. The difference, of course, is instead of displaying a field if the conditions are met you're setting ‘The product costs' field to a specific value. When you set product pricing this way, it's said that you're creating (adding) a ‘pricing level'.
For my client's needs, I had to add four specific conditional pricing levels to set the price of each product based on the customer's subscription level. Using pseudo-code, the price for each product is determined like this:
- If Membership_level is Gold, the price is $110.
- If Membership_level is Silver, the price is $140.
- If Membership_level is Bronze, the price is $170.
- If Membership_level is “” (blank), the price is $200.