Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: How to create city selecting dropdowns on checkout page using checkout extension?

How to create city selecting dropdowns on checkout page using checkout extension?

hasnain_malik
Shopify Partner
5 0 2

I have created Shopify checkout extension I want to make city field as option list when user select country Pakistan. I have already done this by using checkout liquid file but right now I have to implement it by using checkout extension. Please help me how can I make it possible. The SS is attached I want to implement exact same thing using checkout extension or suggest any other method.

Thanks

question.png

Replies 4 (4)

Liam
Community Manager
3108 342 884

Hi Hasnain,

 

It sounds like when you're building your checkout extension, you'll need to use the purchase.checkout.block.render target to add a custom element that performs in the specific way that you want. 
 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

hasnain_malik
Shopify Partner
5 0 2

The  purchase.checkout.block.render will render my checkout extension block although I want to customize by default city field in checkout form.

ShamiqTheDev
Shopify Partner
8 0 0

@Liam I am also looking for the same solution.

 

I want to overwrite the city input field with the searchable dropdown for specific countries.

Kind Regards,

Muhammad Shamiq Hussain
Team Lead Engineer
Engineering
Gaditek, SQUATWOLF

ZainSohail
Shopify Partner
5 0 0

Hello @hasnain_malik @ShamiqTheDev and everyone who ends up at this post. After the recent update to of Shopify Checkout extension, this has become a major problem for stores operating in Pakistan. Just to overcome this, we've created a solution which could solve your issues related to this. You can checkout our app Checkout CitySelect by which you can add this dropdown in your checkout page. We've also created an option where you can show the dropdown field for Pakistan only. Do check it out.