i recently just cloned a repo from github which is supposed to help me customize the magento city field on the checkout page. But i get the following error after installing the module. Package github repository https://github.com/EaDesgin/Magento2-City-Dropdown
1 Answer
Just initialize $citiesData
as array
$citiesData = [];
add above code in app/code/Eadesigndev/RomCity/Block/Checkout/Cities.php
$citiesData = [];
foreach ($items as $item) {
$citiesData[$item->getEntityId()] = $item;
}
add above code in app/code/Eadesigndev/RomCity/Helper/CitiesJsonRomCity.php
$citiesData = [];
foreach ($items as $item) {
$citiesData[$item->getEntityId()] = $item;
}
Hope it Helps.
-
I think this answer is not related to the question at all. Commented Sep 29, 2019 at 15:26
-
@AboElnouR I have checked this module in my system and also faced the same error as shown in the question and answered here accordingly. Commented Sep 30, 2019 at 5:00
-
The error is missing class, not a variable and for me the module working fine without those lines. Commented Sep 30, 2019 at 12:40