Brother. I'm facing some issues. when I add custom code for woocommerce in the shipping zone everything is good I can put the flat rate. But when we go on the ckout page.the cities don't show in the city and town. Allshows in the state's and country. And when when you type the code on cities don't show in both sides only states. I hope you understand if you can make a short video it will be a helpful. And I'm based of UAE Dubai. Thank you
Wow Thank you so much for this amazing video , is there is a way to make these things in separated fields so in checkout page when the user select uganda in the next filed he select kampla then the third filed will contain all kampla areas instead of making them in one filed like {kampla,area1} {kampla,area2}..........so for every state the user select the the second field shows its area in the third field ? can we make this or its difficult , and thank you again for this video
Thanks a lot for the video it was huge help just one question when using a mobile phone it does not change the price based on the location did you also had the same issue?
Thanks so much for your videos! they are really helpful! I was hopping you could help me with something: In Woocommerce, Canada already has States listed in the Zone Regions and I just want to append the cities to the existing States. for exemple 'Trois-Rivieres' for the state of Quebec. thank you for your time
Awesome i have some questions. How to merge the to code to create STATE and CITIES in the same file. Also in case i should update woocommerce or wordpress there will not have error i hope.
Thanks you very much for sharing your knowledge, it is very usefull for WP developers beginners like me!! Do not stop posting more great videos please🙏🙏!!! Greetings from Colombia 🇨🇴
Did you change 'state' on the form to 'district'? because mine still shows 'state'. Since I'm not adding states, it doesn't look right. How can I change it to 'district' like yours.
Use the code below. U can replace the word County to anything yo want. This will go prefereably into a plugin or into your theme functions.php. add_filter( 'woocommerce_default_address_fields', 'custom_override_default_locale_fields' ); function custom_override_default_locale_fields( $fields ) { // Rename the fields $fields['state']['label'] = 'County'; $fields['city']['label'] = 'Town'; return $fields; }
Excellent! For Peru we have the following issue: Country, Department, Province, District (It's a 4 level address). However, if hypothetically we only sell and ship in Peru, I've managed to replace Countries with Departments, States with Provinces, and Cities with Districts using code similar to yours. In case I want to use your method, how can I add more "Countries" (in my case Departments) to your code? In your example you are only declaring UN at the last part, which is only 1 country. I need several "countries". I hope I explained myself with the issue. Thanks!
Thanks for watching and the question. I made something like this th-cam.com/video/gIbQ0LebVEY/w-d-xo.html a while back. Please check it and let me know if it doesn’t answer your question.
@@SamirRifai am sorry, This shows you how to add new countries th-cam.com/video/SyLiDl-jlAE/w-d-xo.html and this one shows you how to add new states or cities th-cam.com/video/ur_5wm4p3Kw/w-d-xo.html
Thanks for posting this. I tried this but there is a problem. You just replaced the states with cities. If you want to still keep "Kampala" as a stand-alone state - to define shipping zone, then this method is not working. Any advice?
@@TechiePress Yea, we should be able to define shipping for states and cities from different sectors. Cities should not be added in state array. They should be added in the default woocommerce selector for cities at checkout. Based on that shipping zones should be defined. I hope you can understand that. I am eager to watch your next video on this! All the best!
Lovely video. Thanks so much for this! Your videos are awesome! Please, I have a little challenge. In Woocommerce, Nigeria already has States listed in the Zone Regions and I just want to append the cities to the existing States. For example, under "Lagos, Nigeria" I just want to insert some areas under "Lagos, Nigeria" like "Lagos Island", "Victoria Island", "Obalande", etc so that in the list what will appear will be "Lagos Island, Lagos, Nigeria", "Victoria Island, Lagos, Nigeria", "Obalande, Lagos, Nigeria", etc without breaking the existing list. When I tried applying your code, it removed every other States in the Woocommerce Zone Regions' list and left only the new ones I added using this custom plugin. Even at the Checkout page, it doesn't allow me select Lagos as the State and then select the appended areas. The State list at the Checkout appears as "Lagos, Lagos Island" and so on. Can you help me with a walk around video or code to achieve this? Thank you in advance.
I’ve made the plug in but the added states doesn’t show up. I did the first part without the hack where it replaces the whole list of Uganda states with just 2 states but it didn’t work on mine
I have a demo script you can edit in the video description. I am not sure of the code you have but that will be of help when you just edit the code with your need.
@@TechiePress I copied your code from git hub and replaced mine. I didn’t edit anything cuz I wanted to be sure it was working first but it still didn’t affect mine. It just shows Uganda with none of the added locations
i am really confused on how to use this can someone help me out. I am building an ecommerce site to be used in Nigeria only and shipping fee for Lagos state varies in local government but woocommerce only offers state and limit to post code but majority of Nigerians don't know their post code nor how to get it and if i make it compulsory to fill it will lead to cart abandonment. Pls what do i do i need to complete this site asap and i don't know how to get my way around this. Thanks in Advance.
This is one of those videos you'll never find anywhere on youtube. Thanks champ.
I am glad you liked it!
You are helping lots of peoples to growing their career man, many thanks 😊, we hope you are making this type of more tutorials in future.
When I settle, I am going to make more soon in the new month.
You are a genius! Exactly what I was looking for.
Thank you for the kind words. Glad you have found value
thanks for your excellent video, actually your all videoes are nice, may we get a video, how to connect WordPress to Mongo DB and how it works???
Brother. I'm facing some issues. when I add custom code for woocommerce in the shipping zone everything is good I can put the flat rate. But when we go on the ckout page.the cities don't show in the city and town. Allshows in the state's and country.
And when when you type the code on cities don't show in both sides only states. I hope you understand if you can make a short video it will be a helpful. And I'm based of UAE Dubai. Thank you
Wow Thank you so much for this amazing video , is there is a way to make these things in separated fields so in checkout page when the user select uganda in the next filed he select kampla then the third filed will contain all kampla areas instead of making them in one filed like {kampla,area1} {kampla,area2}..........so for every state the user select the the second field shows its area in the third field ? can we make this or its difficult , and thank you again for this video
Thanks for watching. I am working on releasing this follow up soon.
Thanks a lot for the video it was huge help just one question when using a mobile phone it does not change the price based on the location did you also had the same issue?
Asante sana, just done the set in less than 5 mins
Karibu.
Thanks so much for your videos! they are really helpful! I was hopping you could help me with something: In Woocommerce, Canada already has States listed in the Zone Regions and I just want to append the cities to the existing States. for exemple 'Trois-Rivieres' for the state of Quebec. thank you for your time
Awesome i have some questions.
How to merge the to code to create STATE and CITIES in the same file.
Also in case i should update woocommerce or wordpress there will not have error i hope.
Thanks for asking. I don’t understand the first question well. But if you update Woocommerce or WordPress, no issue will happen if this is in a plugin
@@TechiePress I need to know how to have the two code in one file for have states and sub state
@@TechiePress I mean i need to create States and Cities on the same file
I am going to share something this week in this line.
Thanks you very much for sharing your knowledge, it is very usefull for WP developers beginners like me!! Do not stop posting more great videos please🙏🙏!!! Greetings from Colombia 🇨🇴
Can i use this with the 3 level states?
Thank You So Much For This Video man!!
Did you change 'state' on the form to 'district'? because mine still shows 'state'. Since I'm not adding states, it doesn't look right. How can I change it to 'district' like yours.
Use the code below. U can replace the word County to anything yo want. This will go prefereably into a plugin or into your theme functions.php.
add_filter( 'woocommerce_default_address_fields', 'custom_override_default_locale_fields' );
function custom_override_default_locale_fields( $fields ) {
// Rename the fields
$fields['state']['label'] = 'County';
$fields['city']['label'] = 'Town';
return $fields;
}
@@TechiePress Thanks!
Excellent! For Peru we have the following issue: Country, Department, Province, District (It's a 4 level address). However, if hypothetically we only sell and ship in Peru, I've managed to replace Countries with Departments, States with Provinces, and Cities with Districts using code similar to yours. In case I want to use your method, how can I add more "Countries" (in my case Departments) to your code? In your example you are only declaring UN at the last part, which is only 1 country. I need several "countries". I hope I explained myself with the issue. Thanks!
Thanks for watching and the question. I made something like this th-cam.com/video/gIbQ0LebVEY/w-d-xo.html a while back. Please check it and let me know if it doesn’t answer your question.
@@TechiePress The video you sent me to is about currencies, sorry.
@@SamirRifai am sorry, This shows you how to add new countries th-cam.com/video/SyLiDl-jlAE/w-d-xo.html and this one shows you how to add new states or cities
th-cam.com/video/ur_5wm4p3Kw/w-d-xo.html
Thanks Bro for the great video you make it so simple. Have searched high low for this solution have subscribed to learn more
Glad you found value. Cheers!
That was the thing I really searched for. Thank you so much.. Just one question, can you make it 4 level? If yes, how?
Yes, it is possible to do so. I will append that potion to the next video update I will make in this line.
Thanks for posting this. I tried this but there is a problem. You just replaced the states with cities. If you want to still keep "Kampala" as a stand-alone state - to define shipping zone, then this method is not working. Any advice?
I am going to do something more comprehensive and full covering the whole shipping and billing address. Still working on it.
@@TechiePress Yea, we should be able to define shipping for states and cities from different sectors. Cities should not be added in state array. They should be added in the default woocommerce selector for cities at checkout. Based on that shipping zones should be defined. I hope you can understand that. I am eager to watch your next video on this! All the best!
Thank you very much. It works perfectly. Greetings form Ghana.
I am glad it was helpful.
Lovely video. Thanks so much for this! Your videos are awesome! Please, I have a little challenge. In Woocommerce, Nigeria already has States listed in the Zone Regions and I just want to append the cities to the existing States. For example, under "Lagos, Nigeria" I just want to insert some areas under "Lagos, Nigeria" like "Lagos Island", "Victoria Island", "Obalande", etc so that in the list what will appear will be "Lagos Island, Lagos, Nigeria", "Victoria Island, Lagos, Nigeria", "Obalande, Lagos, Nigeria", etc without breaking the existing list. When I tried applying your code, it removed every other States in the Woocommerce Zone Regions' list and left only the new ones I added using this custom plugin. Even at the Checkout page, it doesn't allow me select Lagos as the State and then select the appended areas. The State list at the Checkout appears as "Lagos, Lagos Island" and so on. Can you help me with a walk around video or code to achieve this? Thank you in advance.
Use this plugin. wordpress.org/plugins/states-cities-and-places-for-woocommerce/ it has Nigeria cities added as well.
Keep the good work bro
Thanks, will do!
Very valuable tutorial champ, thanks a lot.
Can I use that code only not like a plugin?. Then I can host that PHP code in the Code Snippets plugin. Please reply soon.
Yes, you can.
I’ve made the plug in but the added states doesn’t show up. I did the first part without the hack where it replaces the whole list of Uganda states with just 2 states but it didn’t work on mine
I have a demo script you can edit in the video description. I am not sure of the code you have but that will be of help when you just edit the code with your need.
@@TechiePress I copied your code from git hub and replaced mine. I didn’t edit anything cuz I wanted to be sure it was working first but it still didn’t affect mine. It just shows Uganda with none of the added locations
Did you activate the plugin?
@@TechiePress yesss sirrrrrr!
@@TechiePress I’m thinking if it might have something to do with the file path but my plug in folder is in wp-content/plugins
this is great!!! thank you so much!
Glad it was helpful!
How can i drop down the Cities?
Really helpfull
i am really confused on how to use this can someone help me out. I am building an ecommerce site to be used in Nigeria only and shipping fee for Lagos state varies in local government but woocommerce only offers state and limit to post code but majority of Nigerians don't know their post code nor how to get it and if i make it compulsory to fill it will lead to cart abandonment. Pls what do i do i need to complete this site asap and i don't know how to get my way around this. Thanks in Advance.
You can remove some fields from the check out in as much as you can add them. See th-cam.com/video/QWQXsfxhuPs/w-d-xo.html
Tank you !!!!!
I checked my WhatsApp Tab twice 😂😂😂, and u ROCK btw
Thanks a lot, you have a new suscriber!
Awesome, thank you!
Do I need your plugin to use this one? Cause I cannot see your Plugin on wordpress. How to download it?
There is a link in the description with the code of the plugin
thanks
This is great
bro, can you show us custom payment getway in woocommerce
I have a whole playlist here on how to create one from scratch to finish explaining every step th-cam.com/play/PLNqG1qGUllk21IES6ZJ2WkX1BcbPQF4-7.html
@@TechiePress how to connect WordPress to Mongo DB and how it works???
WordPress usually works with a MySQL database for its backend. Why do you need Mongo DB?
@@TechiePress cause It is nosql database, so it will be more faster than mysql
🔥 thanks
Excelent!!! :D Thank you so much :'')
You're very welcome!
Você me ajudou muito. Obrigado!
Estou feliz por você ter encontrado valor em sua pesquisa
@@TechiePress mais feliz estou eu, acredite!
Thank you so much for your great videos. You are really doing fantastic work.
You are very welcome. I am glad you like them.
thanks bro... thank you so much To keep my word.
I want to follow up you in social media.. give me links
Thanks man, Please Check descriptions on the video.