I want to display the total items count using Knockout, in Magento_Checkout::header/minicart.phtml
, e.g. if I have 2 items with the same SKU in the basket then the total items count is 1.
I have tried using data-bind="text: getCartParam('items_count')"
but this returns the total quantity (i.e. 2).
I could use <?php echo $this->helper('\Magento\Checkout\Helper\Cart')->getItemsCount(); ?>
but I'd like to try and use a Knockout binding instead – is this possible?
Best Answer
Go to Admin -> Stores -> Configuration -> Sales -> Checkout -> MyCart -> Display Cart Summary
There you can change the setting.