Making some products available for certain customers depending on input

Hi, I´m now building a site for a client. Some of the products are going to be sold only in Madrid and others in the rest of Spain. Is there a way of making a popup where the user can add his zip code and depending on this filter the whole store product catalogue? Planning also to add an announcement bar on top of the store where the client can see if they are buying from the “Madrid area” and the “Rest of Spain area”.

I´ve been trying to make this work by adding a Magnific Popup and Locksmith together but not there yet.

Thank you very much!

@ximenagb1

You can try this app. https://apps.shopify.com/advanced-geo-functions

If you have coding expertise then you can make it with custom coding too.

Hi @ximenagb1 m

It is a complex requirement and requires you to have coding experience. With zipcode filter, you can only add tags for products, if customer enters zipcode with product tag, you will display it with shopify’s filter mechanism.

Please refer https://shopify.dev/tutorials/customize-theme-filter-collections-with-product-tag

And the announcement bar also works the same, you just need to create the condition that if the product has a tag that matches the requirement, you will display it.

Please refer Refer https://shopify.dev/docs/themes/liquid/reference/objects/product#product-tags

Hope it helps!