mrzaizai2233 / magento2-dev-log

0 stars 0 forks source link

How to update section Cart after send Ajax #1

Open mrzaizai2233 opened 6 years ago

mrzaizai2233 commented 6 years ago

Source

<script>
    require([
        'Magento_Customer/js/customer-data'
    ], function (customerData) {
        var sections = ['cart'];
        customerData.invalidate(sections);
        customerData.reload(sections, true);
    });
</script>