0

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
  • Try removing var/generated folder and flush cache.
    – aravind
    Commented Jul 24, 2019 at 13:31

1 Answer 1

0

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.

3
  • I think this answer is not related to the question at all.
    – AboElnouR
    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.
    – Mohit Rane
    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.
    – AboElnouR
    Commented Sep 30, 2019 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.