I’m looking to customise a product’s price based on the postcode a customer enters in our homepage postcode modal.
From what I’ve found so far, there doesn’t seem to be a straightforward native way to do this. One approach I’ve seen is creating dummy variants per postcode and then conditionally hiding/showing the relevant variant based on the entered postcode.
Before going too far down that path, I wanted to check if anyone has implemented something similar or has a cleaner / more scalable solution?
The only scalable solution I’ve seen is moving the difference in cost to the shipping profile rates instead of actual product price. There’s no reason for a product to have different prices based on zip code. There is, though, reason to charge different shipping amounts.
Hi mate, we use postcode-based pricing because landed costs vary by state and some locations are operated by licensees who set their own pricing. A single national price wouldn’t reflect the true cost to serve, and adding large delivery surcharges (e.g. $300 to Darwin) creates a poor customer experience. Postcode-based pricing allows us to show a more accurate price upfront based on location.
Do you have like a range of pincodes with a pricing for it. So for example from 79 to 82 price will be $20 and from 83 to 86 it will be $50. If this is the case we can create an object with key value pairs then go through it from user input and display prices accor so dynamic pricing and add to cart with code.
Shopify does not support dynamic pricing by postcode natively, and the “dummy variant” trick is one of the common workarounds but there are cleaner and more scalable approaches depending on your setup.
Shopify doesn’t support pricing by postcode natively
Creating dummy variants per postcode works, but doesn’t scale and becomes messy fast
Cleaner options:
Use a pricing app or Shopify Functions (best for real checkout pricing)
Use JS to swap displayed prices based on postcode (display only, not enforced)
Best practice for scalability:
Save the postcode (localStorage or customer metafield) → apply pricing via app / Function
Dummy variants = OK for very small cases.
Apps or Functions = best long-term solution.