How to change City field to a dropdown in Checkout step Magento 2 The Next CEO of Stack OverflowMagento 2 : How to change UI field(s) dynamicallyCity dropdown at checkout magento 2How to create autocomplete for city field(checkout form) Magento2?Magento 2 City field not required on checkoutMagento 2 Add new field to Magento_User admin formMake dropdown list for field city in magento 2 checkoutMagento 2 : How to change UI field(s) dynamicallyMake City as dropdown list checkoutChange Magento 2 Paypal Logo on Checkout Step 2how to add city dropdown on checkout page instead of typing the city(M2)How to make city as Dropdown in checkout pages
Reference request: Grassmannian and Plucker coordinates in type B, C, D
What flight has the highest ratio of timezone difference to flight time?
Is it correct to say moon starry nights?
Why don't programming languages automatically manage the synchronous/asynchronous problem?
What CSS properties can the br tag have?
Man transported from Alternate World into ours by a Neutrino Detector
Computationally populating tables with probability data
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
Can you teleport closer to a creature you are Frightened of?
Towers in the ocean; How deep can they be built?
Is it okay to majorly distort historical facts while writing a fiction story?
Easy to read palindrome checker
Pulling the principal components out of a DimensionReducerFunction?
Does higher Oxidation/ reduction potential translate to higher energy storage in battery?
How to get the last not-null value in an ordered column of a huge table?
Is there a way to save my career from absolute disaster?
what's the use of '% to gdp' type of variables?
Graph of the history of databases
What does "shotgun unity" refer to here in this sentence?
Can I calculate next year's exemptions based on this year's refund/amount owed?
Airplane gently rocking its wings during whole flight
Small nick on power cord from an electric alarm clock, and copper wiring exposed but intact
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
Is it ok to trim down a tube patch?
How to change City field to a dropdown in Checkout step Magento 2
The Next CEO of Stack OverflowMagento 2 : How to change UI field(s) dynamicallyCity dropdown at checkout magento 2How to create autocomplete for city field(checkout form) Magento2?Magento 2 City field not required on checkoutMagento 2 Add new field to Magento_User admin formMake dropdown list for field city in magento 2 checkoutMagento 2 : How to change UI field(s) dynamicallyMake City as dropdown list checkoutChange Magento 2 Paypal Logo on Checkout Step 2how to add city dropdown on checkout page instead of typing the city(M2)How to make city as Dropdown in checkout pages
I tried multiple solutions found in here, but none seem to fit, the closest one was this one Magento 2 : How to change UI field(s) dynamically, here is my implementation of it:
MyModuleviewfrontendwebjsset-city-mixin.js
define([
'jquery',
'mage/utils/wrapper',
'mage/validation'], function ($, wrapper, validation)
'use strict';
$(document).ready(function ()
$(document).on('change', '[name="country_id"]', function()
//for country
var region = $('select[name="region_id"]');
changeCity(this, region);
);
$(document).on('change', '[name="region_id"]', function()
//for province or region
var country = $('select[name="country_id"]');
changeCity(country, this);
);
);
function changeCity(country, region)
console.log("change city");
var cityObject = $('[name="city"]');
if ($(country).val() == 'CO')
console.log('Colombia');
//send request with country and region and recieve json object
var response = '["name": "Medellin", "code": "50011100","name": "Cali", "code": "50011122","name": "Bogota", "code": "50011133"]';
var cities = JSON.parse(response);
if (cityObject.is('input'))
cityObject.replaceWith(function()
var select = $("<select>",
html: $(this).html()
);
$.each(this.attributes, function(i, attribute)
select.attr(attribute.name, attribute.value);
);
return select;
);
else
cityObject.empty();
if(cities != 'undefined' && cities.length > 0 )
for( var i = 0; i < cities.length; i++ )
cityObject.append("<option value="+cities[i].code+">"+cities[i]. name+"</option>");
else
if (cityObject.is('select'))
cityObject.replaceWith(function()
var select = $("<input>",
html: $(this).html()
);
$.each(this.attributes, function(i, attribute)
select.attr(attribute.name, attribute.value);
);
return select;
);
return function (setShippingInformationAction)
return wrapper.wrap(setShippingInformationAction, function (originalAction)
return originalAction();
);
);
MyModuleviewfrontendrequirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/action/set-shipping-information':
'Tcc_Shipping/js/set-city-mixin': true
;
The result is what I expected to be, but the validation for that field stops working:
Any working alternative would be appreciated too, since what I need is to have a city dropdown with custom codes as values for them.
magento2 magento2.2
add a comment |
I tried multiple solutions found in here, but none seem to fit, the closest one was this one Magento 2 : How to change UI field(s) dynamically, here is my implementation of it:
MyModuleviewfrontendwebjsset-city-mixin.js
define([
'jquery',
'mage/utils/wrapper',
'mage/validation'], function ($, wrapper, validation)
'use strict';
$(document).ready(function ()
$(document).on('change', '[name="country_id"]', function()
//for country
var region = $('select[name="region_id"]');
changeCity(this, region);
);
$(document).on('change', '[name="region_id"]', function()
//for province or region
var country = $('select[name="country_id"]');
changeCity(country, this);
);
);
function changeCity(country, region)
console.log("change city");
var cityObject = $('[name="city"]');
if ($(country).val() == 'CO')
console.log('Colombia');
//send request with country and region and recieve json object
var response = '["name": "Medellin", "code": "50011100","name": "Cali", "code": "50011122","name": "Bogota", "code": "50011133"]';
var cities = JSON.parse(response);
if (cityObject.is('input'))
cityObject.replaceWith(function()
var select = $("<select>",
html: $(this).html()
);
$.each(this.attributes, function(i, attribute)
select.attr(attribute.name, attribute.value);
);
return select;
);
else
cityObject.empty();
if(cities != 'undefined' && cities.length > 0 )
for( var i = 0; i < cities.length; i++ )
cityObject.append("<option value="+cities[i].code+">"+cities[i]. name+"</option>");
else
if (cityObject.is('select'))
cityObject.replaceWith(function()
var select = $("<input>",
html: $(this).html()
);
$.each(this.attributes, function(i, attribute)
select.attr(attribute.name, attribute.value);
);
return select;
);
return function (setShippingInformationAction)
return wrapper.wrap(setShippingInformationAction, function (originalAction)
return originalAction();
);
);
MyModuleviewfrontendrequirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/action/set-shipping-information':
'Tcc_Shipping/js/set-city-mixin': true
;
The result is what I expected to be, but the validation for that field stops working:
Any working alternative would be appreciated too, since what I need is to have a city dropdown with custom codes as values for them.
magento2 magento2.2
add a comment |
I tried multiple solutions found in here, but none seem to fit, the closest one was this one Magento 2 : How to change UI field(s) dynamically, here is my implementation of it:
MyModuleviewfrontendwebjsset-city-mixin.js
define([
'jquery',
'mage/utils/wrapper',
'mage/validation'], function ($, wrapper, validation)
'use strict';
$(document).ready(function ()
$(document).on('change', '[name="country_id"]', function()
//for country
var region = $('select[name="region_id"]');
changeCity(this, region);
);
$(document).on('change', '[name="region_id"]', function()
//for province or region
var country = $('select[name="country_id"]');
changeCity(country, this);
);
);
function changeCity(country, region)
console.log("change city");
var cityObject = $('[name="city"]');
if ($(country).val() == 'CO')
console.log('Colombia');
//send request with country and region and recieve json object
var response = '["name": "Medellin", "code": "50011100","name": "Cali", "code": "50011122","name": "Bogota", "code": "50011133"]';
var cities = JSON.parse(response);
if (cityObject.is('input'))
cityObject.replaceWith(function()
var select = $("<select>",
html: $(this).html()
);
$.each(this.attributes, function(i, attribute)
select.attr(attribute.name, attribute.value);
);
return select;
);
else
cityObject.empty();
if(cities != 'undefined' && cities.length > 0 )
for( var i = 0; i < cities.length; i++ )
cityObject.append("<option value="+cities[i].code+">"+cities[i]. name+"</option>");
else
if (cityObject.is('select'))
cityObject.replaceWith(function()
var select = $("<input>",
html: $(this).html()
);
$.each(this.attributes, function(i, attribute)
select.attr(attribute.name, attribute.value);
);
return select;
);
return function (setShippingInformationAction)
return wrapper.wrap(setShippingInformationAction, function (originalAction)
return originalAction();
);
);
MyModuleviewfrontendrequirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/action/set-shipping-information':
'Tcc_Shipping/js/set-city-mixin': true
;
The result is what I expected to be, but the validation for that field stops working:
Any working alternative would be appreciated too, since what I need is to have a city dropdown with custom codes as values for them.
magento2 magento2.2
I tried multiple solutions found in here, but none seem to fit, the closest one was this one Magento 2 : How to change UI field(s) dynamically, here is my implementation of it:
MyModuleviewfrontendwebjsset-city-mixin.js
define([
'jquery',
'mage/utils/wrapper',
'mage/validation'], function ($, wrapper, validation)
'use strict';
$(document).ready(function ()
$(document).on('change', '[name="country_id"]', function()
//for country
var region = $('select[name="region_id"]');
changeCity(this, region);
);
$(document).on('change', '[name="region_id"]', function()
//for province or region
var country = $('select[name="country_id"]');
changeCity(country, this);
);
);
function changeCity(country, region)
console.log("change city");
var cityObject = $('[name="city"]');
if ($(country).val() == 'CO')
console.log('Colombia');
//send request with country and region and recieve json object
var response = '["name": "Medellin", "code": "50011100","name": "Cali", "code": "50011122","name": "Bogota", "code": "50011133"]';
var cities = JSON.parse(response);
if (cityObject.is('input'))
cityObject.replaceWith(function()
var select = $("<select>",
html: $(this).html()
);
$.each(this.attributes, function(i, attribute)
select.attr(attribute.name, attribute.value);
);
return select;
);
else
cityObject.empty();
if(cities != 'undefined' && cities.length > 0 )
for( var i = 0; i < cities.length; i++ )
cityObject.append("<option value="+cities[i].code+">"+cities[i]. name+"</option>");
else
if (cityObject.is('select'))
cityObject.replaceWith(function()
var select = $("<input>",
html: $(this).html()
);
$.each(this.attributes, function(i, attribute)
select.attr(attribute.name, attribute.value);
);
return select;
);
return function (setShippingInformationAction)
return wrapper.wrap(setShippingInformationAction, function (originalAction)
return originalAction();
);
);
MyModuleviewfrontendrequirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/action/set-shipping-information':
'Tcc_Shipping/js/set-city-mixin': true
;
The result is what I expected to be, but the validation for that field stops working:
Any working alternative would be appreciated too, since what I need is to have a city dropdown with custom codes as values for them.
magento2 magento2.2
magento2 magento2.2
asked Aug 5 '18 at 18:33
jacm365jacm365
161
161
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can use this module, very useful https://github.com/EaDesgin/Magento2-City-Dropdown
i just had to change this view/frontend/web/js/form/element/city.js
line 38
romania = obj.RO,
for this obj.CO
just that or if you want to put it dynamically
const countryCode = jQuery("select[name='country_id']").val();
romania = (obj[countryCode] !== undefined)? obj[countryCode] : obj.CO
add a comment |
I installed the module and I could also see it in my admin --> Menu. But, when I try to go to activation of module as suggested on Github, I get an error as below. What might I have done wrong? I am using it with Magento 2.2.6.
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
#0 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure /Element/Iterator.php(63): MagentoFrameworkAppErrorHandler->handler(8, 'Undefined index...', '/var/www/html/m...', 63, Array)
#1 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(146): MagentoConfigModelConfigStructureElementIterator->setElements(Array, 'default')
#2 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(24): MagentoConfigModelConfigStructure->getTabs()
#3 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(209): MagentoConfigModelConfigStructureInterceptor->getTabs()
#4 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(76): MagentoConfigModelConfigStructure->getFirstSection()
#5 /var/www/html/magento2/vendor/magento/module-config/Controller/Adminhtml/System/AbstractConfig.php(60): MagentoConfigModelConfigStructureInterceptor->getFirstSection()
#6 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoConfigControllerAdminhtmlSystemAbstractConfig->dispatch(Object(MagentoFrameworkAppRequestHttp))
#7 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callParent('dispatch', Array)
#8 /var/www/html/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#9 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
#10 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#11 /var/www/html/magento2/generated/code/Magento/Config/Controller/Adminhtml/System/Config/Index/Interceptor.php(39): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callPlugins('dispatch', Array, NULL)
#12 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(55): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#13 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
#14 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
#15 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#16 /var/www/html/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
#17 /var/www/html/magento2/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#18 /var/www/html/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): MagentoFrameworkAppHttp->launch()
#19 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttpInterceptor->launch()
#20 /var/www/html/magento2/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
#21 main
New contributor
add a comment |
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%2f237219%2fhow-to-change-city-field-to-a-dropdown-in-checkout-step-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use this module, very useful https://github.com/EaDesgin/Magento2-City-Dropdown
i just had to change this view/frontend/web/js/form/element/city.js
line 38
romania = obj.RO,
for this obj.CO
just that or if you want to put it dynamically
const countryCode = jQuery("select[name='country_id']").val();
romania = (obj[countryCode] !== undefined)? obj[countryCode] : obj.CO
add a comment |
You can use this module, very useful https://github.com/EaDesgin/Magento2-City-Dropdown
i just had to change this view/frontend/web/js/form/element/city.js
line 38
romania = obj.RO,
for this obj.CO
just that or if you want to put it dynamically
const countryCode = jQuery("select[name='country_id']").val();
romania = (obj[countryCode] !== undefined)? obj[countryCode] : obj.CO
add a comment |
You can use this module, very useful https://github.com/EaDesgin/Magento2-City-Dropdown
i just had to change this view/frontend/web/js/form/element/city.js
line 38
romania = obj.RO,
for this obj.CO
just that or if you want to put it dynamically
const countryCode = jQuery("select[name='country_id']").val();
romania = (obj[countryCode] !== undefined)? obj[countryCode] : obj.CO
You can use this module, very useful https://github.com/EaDesgin/Magento2-City-Dropdown
i just had to change this view/frontend/web/js/form/element/city.js
line 38
romania = obj.RO,
for this obj.CO
just that or if you want to put it dynamically
const countryCode = jQuery("select[name='country_id']").val();
romania = (obj[countryCode] !== undefined)? obj[countryCode] : obj.CO
answered Nov 3 '18 at 20:17
davindavin
616
616
add a comment |
add a comment |
I installed the module and I could also see it in my admin --> Menu. But, when I try to go to activation of module as suggested on Github, I get an error as below. What might I have done wrong? I am using it with Magento 2.2.6.
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
#0 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure /Element/Iterator.php(63): MagentoFrameworkAppErrorHandler->handler(8, 'Undefined index...', '/var/www/html/m...', 63, Array)
#1 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(146): MagentoConfigModelConfigStructureElementIterator->setElements(Array, 'default')
#2 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(24): MagentoConfigModelConfigStructure->getTabs()
#3 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(209): MagentoConfigModelConfigStructureInterceptor->getTabs()
#4 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(76): MagentoConfigModelConfigStructure->getFirstSection()
#5 /var/www/html/magento2/vendor/magento/module-config/Controller/Adminhtml/System/AbstractConfig.php(60): MagentoConfigModelConfigStructureInterceptor->getFirstSection()
#6 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoConfigControllerAdminhtmlSystemAbstractConfig->dispatch(Object(MagentoFrameworkAppRequestHttp))
#7 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callParent('dispatch', Array)
#8 /var/www/html/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#9 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
#10 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#11 /var/www/html/magento2/generated/code/Magento/Config/Controller/Adminhtml/System/Config/Index/Interceptor.php(39): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callPlugins('dispatch', Array, NULL)
#12 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(55): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#13 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
#14 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
#15 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#16 /var/www/html/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
#17 /var/www/html/magento2/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#18 /var/www/html/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): MagentoFrameworkAppHttp->launch()
#19 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttpInterceptor->launch()
#20 /var/www/html/magento2/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
#21 main
New contributor
add a comment |
I installed the module and I could also see it in my admin --> Menu. But, when I try to go to activation of module as suggested on Github, I get an error as below. What might I have done wrong? I am using it with Magento 2.2.6.
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
#0 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure /Element/Iterator.php(63): MagentoFrameworkAppErrorHandler->handler(8, 'Undefined index...', '/var/www/html/m...', 63, Array)
#1 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(146): MagentoConfigModelConfigStructureElementIterator->setElements(Array, 'default')
#2 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(24): MagentoConfigModelConfigStructure->getTabs()
#3 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(209): MagentoConfigModelConfigStructureInterceptor->getTabs()
#4 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(76): MagentoConfigModelConfigStructure->getFirstSection()
#5 /var/www/html/magento2/vendor/magento/module-config/Controller/Adminhtml/System/AbstractConfig.php(60): MagentoConfigModelConfigStructureInterceptor->getFirstSection()
#6 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoConfigControllerAdminhtmlSystemAbstractConfig->dispatch(Object(MagentoFrameworkAppRequestHttp))
#7 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callParent('dispatch', Array)
#8 /var/www/html/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#9 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
#10 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#11 /var/www/html/magento2/generated/code/Magento/Config/Controller/Adminhtml/System/Config/Index/Interceptor.php(39): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callPlugins('dispatch', Array, NULL)
#12 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(55): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#13 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
#14 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
#15 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#16 /var/www/html/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
#17 /var/www/html/magento2/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#18 /var/www/html/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): MagentoFrameworkAppHttp->launch()
#19 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttpInterceptor->launch()
#20 /var/www/html/magento2/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
#21 main
New contributor
add a comment |
I installed the module and I could also see it in my admin --> Menu. But, when I try to go to activation of module as suggested on Github, I get an error as below. What might I have done wrong? I am using it with Magento 2.2.6.
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
#0 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure /Element/Iterator.php(63): MagentoFrameworkAppErrorHandler->handler(8, 'Undefined index...', '/var/www/html/m...', 63, Array)
#1 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(146): MagentoConfigModelConfigStructureElementIterator->setElements(Array, 'default')
#2 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(24): MagentoConfigModelConfigStructure->getTabs()
#3 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(209): MagentoConfigModelConfigStructureInterceptor->getTabs()
#4 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(76): MagentoConfigModelConfigStructure->getFirstSection()
#5 /var/www/html/magento2/vendor/magento/module-config/Controller/Adminhtml/System/AbstractConfig.php(60): MagentoConfigModelConfigStructureInterceptor->getFirstSection()
#6 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoConfigControllerAdminhtmlSystemAbstractConfig->dispatch(Object(MagentoFrameworkAppRequestHttp))
#7 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callParent('dispatch', Array)
#8 /var/www/html/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#9 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
#10 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#11 /var/www/html/magento2/generated/code/Magento/Config/Controller/Adminhtml/System/Config/Index/Interceptor.php(39): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callPlugins('dispatch', Array, NULL)
#12 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(55): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#13 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
#14 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
#15 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#16 /var/www/html/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
#17 /var/www/html/magento2/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#18 /var/www/html/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): MagentoFrameworkAppHttp->launch()
#19 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttpInterceptor->launch()
#20 /var/www/html/magento2/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
#21 main
New contributor
I installed the module and I could also see it in my admin --> Menu. But, when I try to go to activation of module as suggested on Github, I get an error as below. What might I have done wrong? I am using it with Magento 2.2.6.
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
#0 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure /Element/Iterator.php(63): MagentoFrameworkAppErrorHandler->handler(8, 'Undefined index...', '/var/www/html/m...', 63, Array)
#1 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(146): MagentoConfigModelConfigStructureElementIterator->setElements(Array, 'default')
#2 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(24): MagentoConfigModelConfigStructure->getTabs()
#3 /var/www/html/magento2/vendor/magento/module-config/Model/Config/Structure.php(209): MagentoConfigModelConfigStructureInterceptor->getTabs()
#4 /var/www/html/magento2/generated/code/Magento/Config/Model/Config/Structure/Interceptor.php(76): MagentoConfigModelConfigStructure->getFirstSection()
#5 /var/www/html/magento2/vendor/magento/module-config/Controller/Adminhtml/System/AbstractConfig.php(60): MagentoConfigModelConfigStructureInterceptor->getFirstSection()
#6 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoConfigControllerAdminhtmlSystemAbstractConfig->dispatch(Object(MagentoFrameworkAppRequestHttp))
#7 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callParent('dispatch', Array)
#8 /var/www/html/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#9 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
#10 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#11 /var/www/html/magento2/generated/code/Magento/Config/Controller/Adminhtml/System/Config/Index/Interceptor.php(39): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->___callPlugins('dispatch', Array, NULL)
#12 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(55): MagentoConfigControllerAdminhtmlSystemConfigIndexInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#13 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
#14 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
#15 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterceptionclosure(Object(MagentoFrameworkAppRequestHttp))
#16 /var/www/html/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
#17 /var/www/html/magento2/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#18 /var/www/html/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): MagentoFrameworkAppHttp->launch()
#19 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttpInterceptor->launch()
#20 /var/www/html/magento2/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
#21 main
New contributor
edited 2 days ago
Magento_Bhurio
311110
311110
New contributor
answered 2 days ago
JayantJayant
1
1
New contributor
New contributor
add a comment |
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%2f237219%2fhow-to-change-city-field-to-a-dropdown-in-checkout-step-magento-2%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