Streaming live at 10am (PST)

Post/Zip code form for delivery website


#1

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?


#2

Hello @PChalk1

What platform are you using to build your ecommerce site?


#3

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!


#4

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.


#5

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?


#6

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.


#7

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


#8

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: http://jsfiddle.net/WBvTj/4/ 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


#9

Here’s the forum post that jsfiddle is from: https://stackoverflow.com/questions/9510064/show-divs-based-on-text-search


#10

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


#11

Gotcha. I think this may be closer to what you’re after: http://jsbin.com/ifupix/1/edit?html,js,output Here’s the original forum post: https://stackoverflow.com/questions/37062883/redirect-to-page-based-on-input-value Hope that helps.

Thanks,
Josh


#12

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!


#13

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


#14

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


#15

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

Josh