[Gravity perks] Conditional pricing - is this possible?

I’m using “Gravity Perks - Conditional pricing” to check zip code for certain pricing, what I want to do:
If zip code is within range of let’s say: AB1 - AB1000, then price would be +3$
If zip code is within range of: CAD500 - CAD10000, then price would be +5$, and so on. Problem is, obviously, if I enter conditional logic for pricing less than AB1000 / Greater than AB1, it doesn’t work because of the “AB” part.

Is there a way to make this happen?


Hi Rytis,

Just as you mentioned, the character part of the zip code, will not make it possible to use the Greater than or Less than operators to set the pricing rules within a range. Here are two workaround solutions that would work for you.

  1. You can use the “Start With” operator to check for the Character part of the Zipcode to set the pricing rules.

  2. If that doesn’t work for you, then I’ll suggest using GP Copy Cat to copy only the number part of the zip code to a hidden field, which you can then use to set the pricing rules using the “Greater Than” or “Less Than” operators. By default, GP Copy Cat will copy the entire zip code, but with some custom javascript, you should be able to get only the number part. Here’s a JS snippet you can use as a starting point to copy only the number part of the zip code. This is a JS snippet, so you can use our free Custom Javascript plugin to add it to the form.

That said, for quick response and support for issues or questions relating to Gravity Perks, you can get in touch with us via our Support form, if you have an active Gravity Perks license.


1 Like