Magento 2 how to add city dropdownCity dropdown at checkout magento 2How to add city (not state!) in magento?Remove Country Dropdown at Frontendmagento text field add dropdown value from some other databaseDropdown for weightHow to create custom dropdown attribute for customer in magentoHow to translate city/region dropdown on magento 2Magento 2 Rest API - how do I add values to dropdown product attributeMagento 2.1 Create a filter in the product grid by new attributeMagento 2: how to add City in dropdown?Checkout shipping fields different than default
How to pass a regex when finding a directory path in bash?
Building a road to escape Earth's gravity by making a pyramid on Antartica
Should I "tell" my exposition or give it through dialogue?
How to make a setting relevant?
What's the correct term for a waitress in the Middle Ages?
Do manufacturers try make their components as close to ideal ones as possible?
Z80N multiply compared to MC68000
Efficiently merge lists chronologically without duplicates?
Is the decompression of compressed and encrypted data without decryption also theoretically impossible?
Why did Hela need Heimdal's sword?
C SIGINT signal in Linux
PC video game involving floating islands doing aerial combat
Function to extract float from different price patterns
Their answer is discrete, mine is continuous. They baited me into the wrong answer. I have a P Exam question
What is the advantage of carrying a tripod and ND-filters when you could use image stacking instead?
My coworkers think I had a long honeymoon. Actually I was diagnosed with cancer. How do I talk about it?
How is it possible that Gollum speaks Westron?
What happened to all the nuclear material being smuggled after the fall of the USSR?
Can a magnetic field of an object be stronger than its gravity?
Implement Homestuck's Catenative Doomsday Dice Cascader
Through what methods and mechanisms can a multi-material FDM printer operate?
Java guess the number
Company did not petition for visa in a timely manner. Is asking me to work from overseas, but wants me to take a paycut
How is TD(0) method helpful? What good does it do?
Magento 2 how to add city dropdown
City dropdown at checkout magento 2How to add city (not state!) in magento?Remove Country Dropdown at Frontendmagento text field add dropdown value from some other databaseDropdown for weightHow to create custom dropdown attribute for customer in magentoHow to translate city/region dropdown on magento 2Magento 2 Rest API - how do I add values to dropdown product attributeMagento 2.1 Create a filter in the product grid by new attributeMagento 2: how to add City in dropdown?Checkout shipping fields different than default
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
i am trying to city as dropdown in only checkout page with following script in MagentoCheckoutBlockCartLayoutProcessor.php
$elements = [
'city' => [
'visible' => true,
'formElement' => 'select',
'label' => __('City'),
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
],
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
but still it's showing as input text filed. Any one can please suggest best solution
magento-2.1 dropdown-attribute address
add a comment |
i am trying to city as dropdown in only checkout page with following script in MagentoCheckoutBlockCartLayoutProcessor.php
$elements = [
'city' => [
'visible' => true,
'formElement' => 'select',
'label' => __('City'),
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
],
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
but still it's showing as input text filed. Any one can please suggest best solution
magento-2.1 dropdown-attribute address
Toy can find here answer for this question, magento.stackexchange.com/a/121659/31830
– WISAM HAKIM
Apr 15 '18 at 9:28
I am on the same problem have you found any solution please?
– CDzWebDev
Apr 15 '18 at 11:54
add a comment |
i am trying to city as dropdown in only checkout page with following script in MagentoCheckoutBlockCartLayoutProcessor.php
$elements = [
'city' => [
'visible' => true,
'formElement' => 'select',
'label' => __('City'),
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
],
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
but still it's showing as input text filed. Any one can please suggest best solution
magento-2.1 dropdown-attribute address
i am trying to city as dropdown in only checkout page with following script in MagentoCheckoutBlockCartLayoutProcessor.php
$elements = [
'city' => [
'visible' => true,
'formElement' => 'select',
'label' => __('City'),
'options' => [
[
'value' => '',
'label' => 'Please Select',
],
[
'value' => '1',
'label' => 'First Option',
]
],
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
but still it's showing as input text filed. Any one can please suggest best solution
magento-2.1 dropdown-attribute address
magento-2.1 dropdown-attribute address
asked Dec 13 '17 at 19:15
RameshRamesh
487525
487525
Toy can find here answer for this question, magento.stackexchange.com/a/121659/31830
– WISAM HAKIM
Apr 15 '18 at 9:28
I am on the same problem have you found any solution please?
– CDzWebDev
Apr 15 '18 at 11:54
add a comment |
Toy can find here answer for this question, magento.stackexchange.com/a/121659/31830
– WISAM HAKIM
Apr 15 '18 at 9:28
I am on the same problem have you found any solution please?
– CDzWebDev
Apr 15 '18 at 11:54
Toy can find here answer for this question, magento.stackexchange.com/a/121659/31830
– WISAM HAKIM
Apr 15 '18 at 9:28
Toy can find here answer for this question, magento.stackexchange.com/a/121659/31830
– WISAM HAKIM
Apr 15 '18 at 9:28
I am on the same problem have you found any solution please?
– CDzWebDev
Apr 15 '18 at 11:54
I am on the same problem have you found any solution please?
– CDzWebDev
Apr 15 '18 at 11:54
add a comment |
1 Answer
1
active
oldest
votes
You are working on wrong layoutProcessor. Please, read this documentation which will explain you how to modify existing field on checkout:
http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_field.html
You should register your own layoutProcessor and modify layout array or, for tests purpose, you can modify vendor/magento/module-checkout/Block/Checkout/LayoutProcessor.php which is the proper class to work with.
Bartosz, i think that documentation informs that "how to add new field in checkout not exiting field
– Ramesh
Dec 14 '17 at 9:37
Process is the same but instead of adding new you have to modify existing in your processor. So, in practice, instead of adding new data to layout array modify the part of array which holds city component data. Of course, there is a little bit more in docs due to a fact it is about creating a new field BUT a little more knowledge will not hurt anyone.
– Bartosz Herba
Dec 14 '17 at 9:51
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f205706%2fmagento-2-how-to-add-city-dropdown%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are working on wrong layoutProcessor. Please, read this documentation which will explain you how to modify existing field on checkout:
http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_field.html
You should register your own layoutProcessor and modify layout array or, for tests purpose, you can modify vendor/magento/module-checkout/Block/Checkout/LayoutProcessor.php which is the proper class to work with.
Bartosz, i think that documentation informs that "how to add new field in checkout not exiting field
– Ramesh
Dec 14 '17 at 9:37
Process is the same but instead of adding new you have to modify existing in your processor. So, in practice, instead of adding new data to layout array modify the part of array which holds city component data. Of course, there is a little bit more in docs due to a fact it is about creating a new field BUT a little more knowledge will not hurt anyone.
– Bartosz Herba
Dec 14 '17 at 9:51
add a comment |
You are working on wrong layoutProcessor. Please, read this documentation which will explain you how to modify existing field on checkout:
http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_field.html
You should register your own layoutProcessor and modify layout array or, for tests purpose, you can modify vendor/magento/module-checkout/Block/Checkout/LayoutProcessor.php which is the proper class to work with.
Bartosz, i think that documentation informs that "how to add new field in checkout not exiting field
– Ramesh
Dec 14 '17 at 9:37
Process is the same but instead of adding new you have to modify existing in your processor. So, in practice, instead of adding new data to layout array modify the part of array which holds city component data. Of course, there is a little bit more in docs due to a fact it is about creating a new field BUT a little more knowledge will not hurt anyone.
– Bartosz Herba
Dec 14 '17 at 9:51
add a comment |
You are working on wrong layoutProcessor. Please, read this documentation which will explain you how to modify existing field on checkout:
http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_field.html
You should register your own layoutProcessor and modify layout array or, for tests purpose, you can modify vendor/magento/module-checkout/Block/Checkout/LayoutProcessor.php which is the proper class to work with.
You are working on wrong layoutProcessor. Please, read this documentation which will explain you how to modify existing field on checkout:
http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_field.html
You should register your own layoutProcessor and modify layout array or, for tests purpose, you can modify vendor/magento/module-checkout/Block/Checkout/LayoutProcessor.php which is the proper class to work with.
answered Dec 13 '17 at 19:46
Bartosz HerbaBartosz Herba
95518
95518
Bartosz, i think that documentation informs that "how to add new field in checkout not exiting field
– Ramesh
Dec 14 '17 at 9:37
Process is the same but instead of adding new you have to modify existing in your processor. So, in practice, instead of adding new data to layout array modify the part of array which holds city component data. Of course, there is a little bit more in docs due to a fact it is about creating a new field BUT a little more knowledge will not hurt anyone.
– Bartosz Herba
Dec 14 '17 at 9:51
add a comment |
Bartosz, i think that documentation informs that "how to add new field in checkout not exiting field
– Ramesh
Dec 14 '17 at 9:37
Process is the same but instead of adding new you have to modify existing in your processor. So, in practice, instead of adding new data to layout array modify the part of array which holds city component data. Of course, there is a little bit more in docs due to a fact it is about creating a new field BUT a little more knowledge will not hurt anyone.
– Bartosz Herba
Dec 14 '17 at 9:51
Bartosz, i think that documentation informs that "how to add new field in checkout not exiting field
– Ramesh
Dec 14 '17 at 9:37
Bartosz, i think that documentation informs that "how to add new field in checkout not exiting field
– Ramesh
Dec 14 '17 at 9:37
Process is the same but instead of adding new you have to modify existing in your processor. So, in practice, instead of adding new data to layout array modify the part of array which holds city component data. Of course, there is a little bit more in docs due to a fact it is about creating a new field BUT a little more knowledge will not hurt anyone.
– Bartosz Herba
Dec 14 '17 at 9:51
Process is the same but instead of adding new you have to modify existing in your processor. So, in practice, instead of adding new data to layout array modify the part of array which holds city component data. Of course, there is a little bit more in docs due to a fact it is about creating a new field BUT a little more knowledge will not hurt anyone.
– Bartosz Herba
Dec 14 '17 at 9:51
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f205706%2fmagento-2-how-to-add-city-dropdown%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Toy can find here answer for this question, magento.stackexchange.com/a/121659/31830
– WISAM HAKIM
Apr 15 '18 at 9:28
I am on the same problem have you found any solution please?
– CDzWebDev
Apr 15 '18 at 11:54