Add category to product scroller (hot deals)

Hello,



On my homepage I added a product scroller with promotions (hot deals).

It uses the “Scroller” template and “Hot deals” wrapper.

I found out the content is filled by skins/[SKIN_NAME]/customer/blocks/products/products_scroller.tpl

Now I would like to display the main (top level) category the product is in, on top of each product like the screenshot in attachment.



Can anyone help me with this?



Thanks,



Mark

Attachement didnt work, so:



Hi @mwouters,

Into file skins/[SKIN_NAME]/customer/blocks/products/products_scroller.tpl

[color=#008000]add:[/color]

<br />
{**** added by HungryWeb.net ***}			  <br />
<a href="{"categorie.view&category_id=`$product.main_category`"|fn_url}" class="main_category_scroller">{$product.main_category|fn_get_category_name}</a><br />
{*** end ***}<br />

```<br />
[color=#ff0000]before:[/color]<br />
```php
<br />
<div class="center product-image" style="height: {$image_h}px;"><br />

```<br />
<br />
final result should be looking like this:<br />
```php
<br />
<div class="jscroll-item" width="{$item_width}"><br />
	{**** added by HungryWeb.net ***}			  <br />
	<a href="{"categorie.view&category_id=`$product.main_category`"|fn_url}" class="main_category_scroller">{$product.main_category|fn_get_category_name}</a><br />
	{*** end ***}<br />
	  <br />
	<div class="center product-image" style="height: {$image_h}px;"><br />

```<br />
<br />
<br />
extra you can add to [b]skins/[SKIN_NAME]/customer/styles.css[/b]: ```php
<br />
.main_category_scroller{<br />
  display:block;<br />
  font-weight:bold;<br />
  text-align:center;<br />
  line-height:150%;<br />
  font-size:130%;<br />
}<br />

```<br />
<br />
If anyone need an addon for this please just ask or PM me <img src="upload://ssa1U17ndImgNZSdwFNmOF2yUgM.png" class="bbc_emoticon" alt=";)"><br />
<br />
[ Tested on cs-cart v.3.0.6 professional ]<br />
<br />
I hope that helps,<br />
<br />
---<br />
Valentin

Super! Works great!

I'm glad i could help you





Valentin