Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited body
Source Link
Prince Patel
  • 23.1k
  • 10
  • 102
  • 124
public function Address() { $customerId = "8"; $customer = $this->customerRepository->getById($customerId); $addresses = $customer->getAddresses(); $billingAddress = $customer->getDefaultBilling(); $shippingAddress = $customer->getDefaultShipping(); return $billingAddress; } 

In this code amcode is only getting the id iI want the address as a string.please help me..

public function Address() { $customerId = "8"; $customer = $this->customerRepository->getById($customerId); $addresses = $customer->getAddresses(); $billingAddress = $customer->getDefaultBilling(); $shippingAddress = $customer->getDefaultShipping(); return $billingAddress; } 

In this code am only getting the id i want the address as string.please help me..

public function Address() { $customerId = "8"; $customer = $this->customerRepository->getById($customerId); $addresses = $customer->getAddresses(); $billingAddress = $customer->getDefaultBilling(); $shippingAddress = $customer->getDefaultShipping(); return $billingAddress; } 

In this code is only getting the id I want the address as a string.please help me.

deleted 52 characters in body; edited tags; edited title
Source Link
sv3n
  • 11.7k
  • 7
  • 44
  • 75

In magento 2 how How can i programatically get customer full addresses in string type?

public function Address()  {     $customerId = "8";   $customer = $this->customerRepository->getById($customerId);   $addresses = $customer->getAddresses();   $billingAddress = $customer->getDefaultBilling();   $shippingAddress = $customer->getDefaultShipping();   return $billingAddress;    } 

In this code am only getting the id i want the address as string.please help me..

In magento 2 how can i programatically get customer full addresses in string type?

public function Address()  {     $customerId = "8";   $customer = $this->customerRepository->getById($customerId);   $addresses = $customer->getAddresses();   $billingAddress = $customer->getDefaultBilling();   $shippingAddress = $customer->getDefaultShipping();   return $billingAddress;    } 

In this code am only getting the id i want the address as string.please help me..

How can i programatically get customer full addresses in string type?

public function Address() { $customerId = "8"; $customer = $this->customerRepository->getById($customerId); $addresses = $customer->getAddresses(); $billingAddress = $customer->getDefaultBilling(); $shippingAddress = $customer->getDefaultShipping(); return $billingAddress; } 

In this code am only getting the id i want the address as string.please help me..