How To Display Amount Of Items In Category In Paranthesis () ?

Hello,

Does anyone know how to show amounts of listings in category on category name in parenthesis?

For example, Category1 has 5 products it would display as ' Category1 (5) '

Help much appreciated :)

Thank you!

design/themes/THEME/templates/views/categories/view.tpl

replace:

{capture name="mainbox_title"}{$category_data.category}{/capture}

with

{capture name="mainbox_title"}{$category_data.category} ({$category_data.product_count}){/capture}

Then clear cache and check

(!) This code does not take into account products from subcategories

design/themes/THEME/templates/views/categories/view.tpl

replace:

{capture name="mainbox_title"}{$category_data.category}{/capture}

with

{capture name="mainbox_title"}{$category_data.category} ({$category_data.product_count}){/capture}

Then clear cache and check

(!) This code does not take into account products from subcategories

Hey!

Thanks so much for the help!!

However, it's not quite what i'm looking to achieve.The product amount in () should be displayed in the category names itself (bluish category menu on left of screenshot) -> http://imgur.com/DVgIzgp

Any ideas on how this can be done?

Thanks again E-com labs! :grin:

Hey!

Thanks so much for the help!!

However, it's not quite what i'm looking to achieve.The product amount in () should be displayed in the category names itself (bluish category menu on left of screenshot) -> http://imgur.com/DVgIzgp

Any ideas on how this can be done?

Thanks again E-com labs! :grin:

OK. More complex changes are required. But if I remember correctly, I saw such modules on the marketplace

OK. More complex changes are required. But if I remember correctly, I saw such modules on the marketplace

Okay, I haven't been able to find it on marketplace but still looking. If anyone comes across it, please feel free to send it my way.

Thank's again E-com labs :grin:

We can create this modification for you. Feel free to contact us

Okay, I haven't been able to find it on marketplace but still looking. If anyone comes across it, please feel free to send it my way.

Thank's again E-com labs :grin:

Our team will be glad to help you. Please contact us at sales@simtechdev.com.

If I am in cat1 and no products assigned to it, it shows 0, any way to fix this?

home > cat1 > cat2

design/themes/THEME/templates/views/categories/view.tpl

replace:

{capture name="mainbox_title"}{$category_data.category}{/capture}

with

{capture name="mainbox_title"}{$category_data.category} ({$category_data.product_count}){/capture}

Then clear cache and check

(!) This code does not take into account products from subcategories