Search Results to Display Calculated shipping based on Zip code

Search Results to Display Calculated shipping based on Zip code

thetiredealer
Tourist
5 0 3

Hello, we mainly dropship tires and sell them online, we are struggling with some suppliers since a tire may be located in California but the person buying it is in New York causing shipping costs to be much higher than expected. We are looking to build a search results page that could collect the customer's zip code when starting a search for a product, and having shipping rates calculated from our location's warehouse zip code, to customer's zip code and add that to the tire cost to display a dynamic price search results page for customer that we can then offer shipping included with price displayed. 

 

We are just struggling with the logic on how to make this possible if at all. Any ideas or suggestions would be highly appreciated. Also please try not to recommend Apps, since we want to build the app or page ourselves so we are looking more for technical advise. Thanks in advance. 

Reply 1 (1)

nadinethery
Shopify Partner
19 1 6

We faced the same challenge in our e-commerce. Since we need to collect the user's zip code to check if can serve certain items there.

You probably need to prompt the user to ask for their zip code. We use a mix of storing the zip code in the local storage and also in the cart's attributes, so you can retrieve the info from the serverside, accessing the {{cart.attributes.zipcode}}

Maybe you can create a Web Component for the search that launches the search once it has retrieved the zipcode from the cart.