I would like to have a way for my customer to see all of the categories that a product is in.
We sell books, and many titles are relevant to multiple categories. As it is, the product detail page only shows one category in the list of breadcrumbs.
I haven't really looked into it much, but it appears that the category shown in the breadcrumbs is the one that is "checked" in the edit product page. It also appears that the Similar Products block uses this "main" category to generate results. It would be nice to have more control over these things.
Any ideas? Thanks for reading.
You can use the following code in the product template:
{foreach from=$product.category_ids item=cid}
{$cid|fn_get_category_name}
{/foreach}
(!) Not tested
Thanks ecom! You are always helpful. I will try this and report back
This works perfectly! I placed the code in a block with smarty support and dropped that into my product page.
Good work.
Thanks again
Ok, I have a new one for you, eCom.
How can I implement this kind of thing on a search result page?
I would like to show all categories represented in the search results.
Thanks for reading!
Ok, I have a new one for you, eCom.
How can I implement this kind of thing on a search result page?
I would like to show all categories represented in the search results.
Thanks for reading!
What template do you use to display search results? There are 3 templates on the clean installation
hmmm, I am not aware of where to specify a search results template. isn't it just considered a page, Advanced Search?
All templates are located in the following directory:
design/themes/YOUR_THEME/templates/blocks/product_list_templates/products_multicolumns.tpl
Track required template to apply changes
Ah, ok I see what you mean. I use the multicolumn.
Change the following template
design/themes/YOUR_THEME/templates/blocks/list_templates/grid_list.tpl
I will try this and report back. Thanks so much eCom.
We are glad to hear that!