Customer address not save programatically in magento 2
I tried to create and save customer address for a registered, logged user. My code in controller is like below. $addresss = $objectManager->get(‘MagentoCustomerModelAddressFactory’); $address = $addresss->create(); $address->setCustomerId(3) ->setFirstname(“FirstName”) ->setLastname(‘LastName’) ->setCountryId(“AE”) ->setPostcode(“10000”) ->setCity(‘Panoi’) ->setTelephone(“074983118”) ->setFax(“443456789”) ->setCompany(“Company”) ->setStreet(“Street”) ->setIsDefaultBilling(‘1’) ->setIsDefaultShipping(‘1’) ->setSaveInAddressBook(‘1’); try{… Read More »Customer address not save programatically in magento 2