CMS Magento Mastering Development

Order summary items-in-cart update

I want to update the items in cart count in the checkout#payment sidebar. I have added a button that when clicked the items in cart will be added by one. So far the items in cart are updating correctly but the count in the Order summary not being displayed correctly. As seen in the image I want to update the count everytime I click the button as shown below

As you can see in the image there are 7 Items in Basket but when you check and count all items it should say 8 items in basket How can I update the 7 to make it 8? It seems that this is using the

text: getCartSummaryItemsCount()

I don’t know how to update the count after the ajax call. Below is my code to update the sidebar but the count is not updating

/** @inheritdoc */
success: function (res) {  

   var sections = ['cart'];
   customerData.reload(sections, true);
   var deferred = $.Deferred();
   getTotalsAction([], deferred);
   return false;

Not sure how to update the count here. I’m doing the changes in the checkout payment page I want to update the count in the sidebar

Leave a Reply

Your email address will not be published. Required fields are marked *