Skip to main content

Category title in product listing grouped by cat

More
12 years 9 months ago #135108 by 2caffe
-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : x.x.x
-- Joomla version -- : x.x
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

-- url of the page with the problem -- : duecaffeprova3.altervista.org/automobili/lubrificanti-racing
-- HikaShop version -- : 1310121420
-- Joomla version -- : 2.5.16
-- PHP version -- : 5.3
-- Browser(s) name and version -- : Every
-- Error-message(debug-mod must be tuned on) -- : None

I have a vertical menu with submenu in the left (it's a custom menu, since not all the items link to product pages).
In "Automobili" > "Lubrificanti racing", I show the products of category grouped by category.
I would like to show the title of the parent category ("Lubrificanti Racing") over the groups.
Is it possible?

Thanks in advance,
Marco

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135123 by Mohamed Thelji
Hi,

If you have set of title through the "title" option of the configuration page of your category listing content menu, you'll just have to add some code like :
Code:
<?php echo '<h1>'.$this->document->title.'</h1>'; ?>
At the beginning of your "listing_div" file of your "category" view of your front-end template via "Hikashop->Display->Views".

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135210 by 2caffe
Hi Mohamed,
I think that the file you suggested me is not correct: I added the line of code but nothing changed (actually, the structure of the resultant HTML is not consistent with the structure of the page: there is no DIV element with 'hikashop_subcategories' class, for example).

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135277 by nicolas
I don't think that you need to edit any code. Simply turn on the component heading option of your menu item via the joomla menu manager and that should do it.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135298 by 2caffe
Hi Nicolas,
what you suggest is what I did before contacting you, as you can see from the screenshot below.


Any other hints?
I can provide you access to the site, if you like.

Thanks.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135342 by Mohamed Thelji
Sending me a temporary access to your website through a private message will probably help me to understand your issue.
thanks :).

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135770 by Mohamed Thelji
Hi,
I just did some tests through your website, and the problem was coming from the way you configured your Sub elements filter option, when you set it to "All sub elements" it works fine.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135779 by 2caffe
Hi Mohamed,

The soulution you provided is not so good for me: I do need grouping by category, but I would like to have a main title (i.e. the parent category) over the grouping.
Is it possible?

Thanks,
Marco

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135882 by Xavier
Hi,

This will require a view edition so some custom code.
PHP skills are needed.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #135884 by 2caffe
Hi Xavier,

shoud I create a new view?
Isn't possible to edit the existing grouping-by-category view, adding a title?

Marco

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #136001 by Xavier
Hi,

The view to edit is "product / listing".
The desired part is in the "else":
Code:
} else if(!empty($this->rows) && !empty($this->categories)) {
The following user(s) said Thank You: 2caffe

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #136021 by 2caffe
Got it!
Thanks!
Marco

Please Log in or Create an account to join the conversation.

Time to create page: 0.250 seconds
Powered by Kunena Forum