How to get Shipping Flat Rate programmatically?

Hi, I would like to add the shipping flat rate to the minicart and I just can’t find any documentation on it. There are some articles on how to add stuff on the minicart, others on how to access Shipping Amounts but still quite confusing.

So anyone here that can help?

Hi, Do you want to add shipping flat rate to cart item prices or add content to minicart?

I would like to retrieve shipping rates, wether it’s flat rate or table rates, and have them displayed in the minicart even when we visit as guest (although only registered customers can purchase).

Hi,

You can get shipping rates using JS.

However you need shipping address in order to get rates.

Kind regards,

Thomas

1 Like

This is great! Thanks!

The shop I’m working on is only shipping to one (small) country with simple table rates so I can “fake” the address by putting a generic country address and the result will be correct.