I set a discount code for local friends to use to have free shipping because I can just give them the order instead of shipping it. I set up a customer segment based on location using my coordinates and it gives you a map popup with a circle showing the area that would qualify for the discount so I was able to confirm the radius I wanted to include.
I have had 2 people try to use it and it is not accepting it. It says it is not available to them. When I try to do a draft order on the backend using their address and selecting a shipping option then adding the code, it accepts it, but it doesn’t work in practice. I have no restrictions on the code other than the location and the address I’m using is well within the radius. At a loss.
I even put in my own address as the shipping location at checkout and it still says no!
Hi @fractalbeauty ,
It sounds like you’re doing everything right with your location-based discount, but there are a few potential issues that might be causing the discount code not to work in practice:
-
Location Verification Consistency:
- In your draft order, the system might be verifying the customer’s address exactly as it appears in your settings, whereas on the live checkout, it could be using a different method (like IP geolocation or a slight variation in how the shipping address is entered). Double-check that the addresses used at checkout precisely match what your customer segment expects.
-
Discount Code Settings:
- Confirm that the discount code is set up correctly as a free shipping discount and that there aren’t any hidden restrictions beyond the location criteria. Sometimes additional settings (like minimum order value) might affect availability.
- Verify that the discount is applicable to the shipping method chosen on the checkout page. If a customer selects a different shipping option, the discount might not apply.
-
Customer Segmentation Timing:
- The customer segment based on location might not be updating in real time during checkout. Ensure that the segment’s logic is applied to the live customer data (or shipping address) in the same way as in your draft orders.
-
Potential Caching or Browser Issues:
- Sometimes caching on the storefront or browser inconsistencies can cause unexpected behavior. Try clearing the cache or testing in an incognito window to see if that resolves the issue.
If everything appears correct and you’re still facing issues, it might be worth reaching out to Shopify support to see if there’s a known bug with location-based discounts in your theme version.
Hey @fractalbeauty ,
Hope you’re doing great!
The problem is likely in how the location-based customer segment is being applied during checkout. Here are some troubleshooting steps:
- Check segment configuration: Verify that your customer segment is configured as “Customers who are within X miles/km of address” rather than other location options.
- Try postal/zip code instead: Location-based segments using coordinates can sometimes be unreliable. Consider creating a segment based on postal/zip codes instead - this tends to work more consistently.
- Check device location settings: For location-based discounts to work, customers need to have location services enabled on their device and browser. Ask your friends if they allowed location access.
- Create a backup discount code: As an immediate solution, create a secondary discount code without location restrictions but with a usage limit to only the specific emails of your local friends.
- Alternative approach: Instead of using a discount code, you could set up a local pickup delivery option that’s free. Your friends can select this at checkout instead.
If you’ve tried these steps and still have issues, it might be worth contacting Shopify Support directly as there could be a technical issue with the geolocation feature.
Let me know if any of these solutions work for you!
Cheers!
Shubham | Untechnickle
what is the syntax needed to use address or zip code instead of coordinates? I have rudimentary understand of SQL (this looks like SQL to me) so I don’t know a ton, just enough to kind of understand what I’m looking at!
This is the default template it provides, I entered the coordinates of my location to form the radius and everyone I want to include should be within it.