Learn how to automatically recollect shipping rates after updating the cart item using javascript for refresh cart totals and update shipping rates, enhancing user experience in the checkout process.
We can get customer data by injecting “Magento_Customer/js/customer-data” using require function in our custom js/javascript component in Magento 2.
Hello Devs, In this tutorial we are going to see how we can get customer data in a custom js component. We can get customer data by injecting “Magento_Customer/js/customer-data” using require function in our custom js/javascript component in Magento 2. After injecting the object, we can use customerData.get(‘customer’) to get customer information if the customer …