Post/Zip code form for delivery website

Hi all,

I’m building an eCommerce website for a local community, and they require a ‘post code’ form on the homepage.

Users are not able to see products until they enter their post code, and if it’s a post code matching the relevant areas, the product page is displayed. I have a .csv file with a list of 5k post codes, but unfortunately I can’t use Webflow to check the form entry against a database with the post codes without some added code.

Not sure if there’s a way to do this - I’m happy to integrate 3rd party platforms to achieve this functionality.

Has anyone got any ideas or experience with this?

Hello @PChalk1

What platform are you using to build your ecommerce site?

Using Webflow + Foxy. Not sure if I can embed some sort of 3rd party form that re-directs to my chosen page (‘Browse All Products’ page) if the post code matches one in my CSV.

Really need a post code/zip functionality (like Postmates) on the home!

Have you contacted Josh about this? I’m pretty sure they always have ideas and solutions.

Another approach that you can take is this:

With some stying and work on your collections you can achieve this as well.

Hope this helps.

Thanks - I’ll reach out to him.

MixItUp looks great, but I’m not sure if it will work for my post code requirements? I’ll definitely take a look for some good filtering though.

edit: Would you be able to link to the Josh you are referring to?

Jus an idea here:

Can you create a ‘menu’ with the zip codes and in your collection of products have a field for the zip codes that apply to that product?

Oh and @foxy (Josh) can give you a hand.

It’s certainly a possibility, but not as elegant as a post code box (as long as the user matches one of the post codes in the csv file, they can receive any of the products).

Will reach out to Josh, although this isn’t really a Foxy issue - I’m currently trying to find a 3rd party solution that will allow do a ‘check’ on a post code - if it matches my .csv file, it’ll redirect to my-test-website.com/all-products

Hi @PChalk1.
I think you’re right in that this needs to happen before sending product data to Foxy. I haven’t tested this yet, but you may be able to use something like this: Edit fiddle - JSFiddle - Code Playground It will obviously need to be customized some but hopefully that will help get you headed in the right direction.

As always, please don’t hesitate to reach out if we can help with anything.

Thanks,
Josh

Here’s the forum post that jsfiddle is from: jquery - Show divs based on text search - Stack Overflow

1 Like

Thanks for the input @foxy - I’m certainly investigating jsfiddle. I have limited js knowledge so hopefully the Stackoverflow post will help.

Essentially I’d like the post code form to verify a post code against a list of post codes (which I have saved in a .csv), and then re-direct to my ‘browse products’ page.

jsfiddle could be the answer - looks like it reveals a div, but I’m sure I can add ‘redirect’ code if the input matches a post code.

Thanks again for your help

Gotcha. I think this may be closer to what you’re after: JS Bin - Collaborative JavaScript Debugging Here’s the original forum post: javascript - Redirect to Page based on Input Value - Stack Overflow Hope that helps.

Thanks,
Josh

Thanks for the link! Looks like the functionality of that is still different - seems to re-direct to a page with /enteredcontent rather than verifying a postcode/phrase against a database and then re-directing to the www.exampleurl.com/browse-all page.

Still struggling to find a solution!

Hi @PChalk1.
The example I linked to would allow you to compare the input value against any number of values and set the url for each result. If hitting against an actual file is the issue, it’s definitely possible, but will require technology outside of Webflow. Hope you find what you’re looking for. :slight_smile:

Thanks,
Josh

Thanks :). I’ll update this post when I find a solution. Look forward to using Foxycart with my site!

Sounds like a plan. Definitely let us know if we can help with anything at all. :slight_smile:

Josh

I did this once for a client with storepoint locator if you’re ok using a 3rd party service Overview of Storepoint Store Locator Software Features

2 Likes

Putting this out there since my client has been looking for something like this too - we set up and its working well so far: http://deliverychecker.co/ - If you’re ok with using a 3rd party app its a good option.

1 Like