but when I refresh the page, then the amount of the shipment is shown as it should be:
This is my backend code, to get the shipping amount:
<?php $cart = $objectManager->get('\Magento\Checkout\Model\Cart'); $shipping_amount=$cart->getQuote()->getShippingAddress()->getShippingAmount();?> <tr> <td>Shipping (<?php echo $shipping_amountc; ?>) </td> <td align="right"><?php echo number_format($shipping_amount,2);?></td>
Is there any way to bring the shipping amount without refreshing the page? please who can help me, I appreciate it!