Skip to main content
18 events
when toggle format what by license comment
Feb 18, 2020 at 11:59 comment added Milind Singh Yes, as the \Magento\Directory\Model\Region does not implement the RegionInterface, why not use the $address->setRegionId($regionId); ?
Feb 18, 2020 at 7:08 comment added Rajan Soni If our county is KWT then I need to set the state programmatically it showing me the error like setRegion() must implement interface Magento\Customer\Api\Data\RegionInterface
Dec 6, 2018 at 14:35 vote accept Jafar Pinjar
Dec 6, 2018 at 14:32 comment added Milind Singh $address->setRegionId($regionId); I am setting region ID, not region. Kindly verify.
Dec 6, 2018 at 14:28 comment added Jafar Pinjar yes i used this code to set regin, $address->setRegion(), i got below error, Fatal Error: 'Uncaught TypeError: Argument 1 passed to Magento\\Customer\\Model\\Data\\Address::setRegion()
Dec 6, 2018 at 14:25 comment added Milind Singh I have removed addData. Kindly check the code now.
Dec 6, 2018 at 14:22 comment added Jafar Pinjar hi @Milind, not cleared with your comment, what change i need to do?
Dec 6, 2018 at 14:11 comment added Milind Singh Sorry Address repository return mistook as Address model. I have again.
Dec 6, 2018 at 14:11 history edited Milind Singh CC BY-SA 4.0
Address repository return mistook as Address model
Dec 6, 2018 at 12:51 comment added Jafar Pinjar hi @Milind, getting this error, Call to undefined method Magento\\Customer\\Model\\Data\\Address::addData()
Dec 5, 2018 at 13:02 comment added Milind Singh Hi @jafarpinjar I have updated the code obtain the region_id
Dec 5, 2018 at 13:01 history edited Milind Singh CC BY-SA 4.0
region_id added by loading it from the database
Dec 4, 2018 at 8:07 comment added Jafar Pinjar hi @Milind, This is not working for me
Sep 3, 2018 at 13:35 comment added Jafar Pinjar my issue is similar to this one, I need to update address from request magento.stackexchange.com/questions/240352/…
Sep 3, 2018 at 12:59 comment added Milind Singh What value did you put in region? It should exist in database.
Sep 3, 2018 at 6:00 comment added Jafar Pinjar $address->setRegion() i used, but its not working
Sep 2, 2018 at 8:11 history edited Milind Singh CC BY-SA 4.0
added 58 characters in body
Sep 1, 2018 at 12:13 history answered Milind Singh CC BY-SA 4.0