I want to develop custom module that is used for adding country code field before telephone field on checkout page in magento 2.3.4.
- This is the Final Answer of this question: magento.stackexchange.com/questions/187847/…Deep Shah– Deep Shah2021-04-20 12:43:48 +00:00Commented Apr 20, 2021 at 12:43
- magento.stackexchange.com/questions/222229/…Deep Shah– Deep Shah2021-04-21 13:19:52 +00:00Commented Apr 21, 2021 at 13:19
- Add customization in telephone field using Knockout Js: magento.stackexchange.com/questions/222229/…Deep Shah– Deep Shah2021-04-21 13:21:23 +00:00Commented Apr 21, 2021 at 13:21
2 Answers
Here is the some free and paid extension available, you can use it:
Free - https://github.com/MaxMage/international-telephone-input
Paid - https://magery-themes.com/intl-tel-input-magento2.html
Thanks
- But I want to build custom module and don't want to use any paid extensions.Deep Shah– Deep Shah2021-04-20 11:53:25 +00:00Commented Apr 20, 2021 at 11:53
- 1This one is free, Free - github.com/MaxMage/international-telephone-inputVibhore Jain– Vibhore Jain2021-04-20 12:25:52 +00:00Commented Apr 20, 2021 at 12:25
- But it's not working fine.. - Vibhore JainDeep Shah– Deep Shah2021-04-20 12:56:01 +00:00Commented Apr 20, 2021 at 12:56
- @DeepShah Inside Block/PhoneNumber.php file comment or remove this line, "preferredCountries" => [$this->helper->preferedCountry()]. and then it should work fine.Natha Odedara– Natha Odedara2021-10-29 07:17:28 +00:00Commented Oct 29, 2021 at 7:17
You can use the below extension, it automatically adds validation based on the selected country with the country flags and automatically sets the user country by default based on their Geo IP location. It is also supported with the latest Magento 2.4.5 version as well.
https://marketplace.magento.com/ananta-module-telephonevalidation.html