cancel
Showing results for 
Search instead for 
Did you mean: 

How to get value from quote_address table in Magento2

How to get value from quote_address table in Magento2

How to get value from quote_address table for checkout and cart page in Magento2. Need values for guest and login user both in Magento2 cart and checkout page

 
1 REPLY 1

Re: How to get value from quote_address table in Magento2

@yasirkoraief85 

You can use the below code :

 

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$cart = $objectManager->get('\Magento\Checkout\Model\Cart');

$billingAddress = $cart->getQuote()->getBillingAddress();
print_r($billingAddress->getData());

$shippingAddress = $cart->getQuote()->getShippingAddress();
print_r($shippingAddress->getData());
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.