I want to show the product count on layer navigation for text swatches.
By default Magento providing this feature for normal attributes(Text, Dropdown, and multi-select) in layer navigation but is not available for swatches.
Please see the below-attached screenshot for more clarity.
I Want like below
Magento by default providing for another attribute like text, dropdown
Please help on above issue.Any references or suggestions highly appreciated
Thanks
Best Answer
Look at
\Magento\Swatches\Block\LayeredNavigation\RenderLayered::getOptionViewData
You can modify option returning option data to
and render product count in
Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
Note, that you must not modify core module code. Instead that, you can use base ways to customizing module behavior (
plugins
,layouts
, etc)