Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Product Page: How Do I Display All Categories A Product Is In? Rate Topic   - - - - -

 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 15 January 2016 - 12:23 AM #1

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.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19690 posts

Posted 15 January 2016 - 11:26 AM #2

You can use the following code in the product template:

{foreach from=$product.category_ids item=cid}
<a href="{"categories.view?category_id=`$cid`"|fn_url}">{$cid|fn_get_category_name}</a>&nbsp;&nbsp;&nbsp;
{/foreach}

(!) Not tested


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 15 January 2016 - 09:17 PM #3

Thanks ecom! You are always helpful. I will try this and report back



 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 15 January 2016 - 09:54 PM #4

This works perfectly! I placed the code in a block with smarty support and dropped that into my product page.

 

Good work.

 

Thanks again



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19690 posts

Posted 18 January 2016 - 11:04 AM #5

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 01 February 2016 - 10:59 PM #6

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!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19690 posts

Posted 02 February 2016 - 08:01 AM #7

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 02 February 2016 - 07:16 PM #8

hmmm, I am not aware of where to specify a search results template. isn't it just considered a page, Advanced Search?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19690 posts

Posted 03 February 2016 - 09:34 AM #9

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 03 February 2016 - 10:53 PM #10

Ah, ok I see what you mean. I use the multicolumn.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19690 posts

Posted 04 February 2016 - 09:36 AM #11

Change the following template

 

design/themes/YOUR_THEME/templates/blocks/list_templates/grid_list.tpl


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 04 February 2016 - 07:57 PM #12

I will try this and report back. Thanks so much eCom.



 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 04 February 2016 - 11:49 PM #13

it worked! 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19690 posts

Posted 05 February 2016 - 09:10 AM #14

it worked! 

 

We are glad to hear that!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.