cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Shipping amount in cart Page magento 2

How to get Shipping amount in cart Page magento 2

I want a applied shipping amount in my custom page.

http://prntscr.com/iv862h

I want to get Applied Shipping amount for guest and logged In Customer.

Looking forward to your reply.

Thanks

Problem solved? Click Accept as Solution!
Magento Extension Developer | Facebook | Twitter
Tags (1)
1 REPLY

Re: How to get Shipping amount in cart Page magento 2

public function __construct(
    \Magento\Quote\Model\Quote\Address\Total $total
) {
    $this->total = $total;
}

 

in your function use,
$amount = $this->total->getShippingAmount();

 

Clear Genereated folder and clear cache.

If Issue Solved, Click Kudos/Accept As solutions.