How to add city field on shipping calculator of the cart page?

Highlighted
New Member
1 0 1

Hi There,

Is it possible to add city field on shipping calculator that gets displayed on the cart page?

 

I was able to display calculator using the article available on 

https://help.shopify.com/en/themes/customization/cart/add-shipping-calculator

After following this article I can see shipping calculator on cart page that displays country, state and zip fields on the form. But I would also like to add city field to it.

 

If this is supported then how can I add it?

 

And if not, when this feature will be available?

1 Like
Shopify Staff
Shopify Staff
200 17 42

 

Hi, @CMojo!

 

Julie here from Shopify Support.

 

Adding a shipping calculator to your cart page is a great idea and can be really useful for customers. 

 

Is there a reason why you’re wanting to add a city field? The shipping calculator is actually designed to calculate shipping rates using the GET /cart/shipping_rates.json Shopify Ajax API call, which only requires country, state, and ZIP codes. Because of this, adding a city field will have no impact on the calculator as it is not necessary, nor supported. 

 

In fact, if you take a look at some of the shipping calculator apps in our App Store, like Shipping Rates Calculator+ and Calio Shipping Rate Calculator, you can see in the screenshots that the shipping calculators only include the country, state, and ZIP code fields. This is because these apps also use the Shopify Ajax API to pull the calculated rates. 

 

Not only is the city not a factor in the shipping calculation, but it adding it would also force your customers to complete one more field when wanting to calculate their shipping rate. To keep things simple for your customers, it’s important to give them as few steps as possible to complete the checkout. 

 

I hope this helps! Let me know if you have any further questions.

Julie | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes