Subcategories and products, different views

  • Posts: 182
  • Thank you received: 15
13 years 3 months ago #41249

I have a question regarding the view of products depending on the way you click your way to that category.

For example, I have some categories at the root of my shop, those categories are shown as a list.
When I click on those categories I get the same view as per the settings in the Associated Module. But is there a way to make this view different depending on the way I have set up the menus. For one category I have a 3column view and for others I have simple list views depending on the type of products.

Going through the menus I get the look I want but it is different if I go over the category listing.

Thanks

Jan

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

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
13 years 3 months ago #41431

If you have different menu items to access the products listings of your different categories, you will be able to set different display settings to each products listing associated module of your menu items.

Otherwise, no there is no option for that. That could still be possible by editing the view files but you need to know programming for that.

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

  • Posts: 182
  • Thank you received: 15
13 years 3 months ago #41492

Yes I have set up a few variants of the template depending on category.

My menu tree is more or less the same as my category tree.

The difference I see is when I from the meny select just a category, then the subcategories are displayed as a list. If I now select one of the subcategories from the list I get a different product list view than if I would have gone through the menu tree to this subcategory.

This is how it looks from the menu selection



This is how it looks from the category view, as you see the "Add to cart" button is gone there.

Attachments:

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

  • Posts: 182
  • Thank you received: 15
13 years 2 months ago #42913

I am still struggling with the view of products. Going through my menu everything looks as I want and the different categories have the views I have set up. Some has DIV with images and some are Listviews without images. So far so good.

My problem is when I select the webshop from the menu. Then I ge a list of all root categories, that is OK. Now if I click on one of the listed categories I get a product view that are from the settings of the root category "Webshop" In my case DIV 3 Columns. One other thing is that the category name is no longer diplayed at the top, it just says "Webshop". I have tried several settings and no matter what I set in the category settings, it is the setting from the root category (i.e. Webshop) that rules or override any setting in my subcategories.

If I now click on a product in the categorydisplay I get everything as is should be and it looks the same as if I came through the menus.

What is it that makes this behavior? And why is the root category overriding the subcategory settings? Have I missed somehting and why is it working over the menues and not from the categorylistings.

Jan

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

  • Posts: 182
  • Thank you received: 15
13 years 2 months ago #42983

Investigating this some more I can see that I have totally different URL's to reach these two different views of the same category listing.

The one I get going through the menus is:
index.php?option=com_hikashop&view=product&layout=listing&Itemid=180

But clicking on the category listings from the Webshop root to show the category gives this URL:
index.php?option=com_hikashop&ctrl=category&task=listing&cid=36&name=efi-semimatt&Itemid=114

The category in question has the ID 36 and I can find ID 114 in two places, first the Webshop Root has ID 114 and I think this is the reason why if I change the layout settings for the Webshop Root this category gets that setting. I have also found that another category has ID 114 as a module, but that is not in play here ( I think)

In the first example ID 180 is the Menu ID for that menu item to reach this product listing.


I really need to solve this and to be able to control the layout in both scenarios, the customer can go both ways to reach a product listing and to have two different view is really confusing.

Why can't I control this on category level, and why isn't there any way to select a layout or an HTML override at Category settings?

Please advise!

Jan

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

  • Posts: 182
  • Thank you received: 15
13 years 2 months ago #42989

I did try what you suggested here: www.hikashop.com/en/forum/4-how-to/41761...category-layout.html but that didn't do any difference.

To make it more complicated ( or interesting ) is that this behavior depends on where you come from in the structure of the shop.

If I for example go through the menu to the desired category listing:
index.php?option=com_hikashop&view=product&layout=listing&Itemid=180

Then I go back through the breadcrumbs to the category above and then get the category listing. Now this listing has a different sort order ( ?? ) and if I now select the category I want I get the correct view, but it is because I have a another URL for this listing:
index.php?option=com_hikashop&ctrl=category&task=listing&cid=36&name=efi-semimatt&Itemid=115
Note that the itemID for the root ( not really the root but where I went down the branch) now is 115 and that category setting has the List view defined in its settings.


Jan

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

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
13 years 2 months ago #43112

Hi,

The settings are bounds to menus not categories. So when you create a categories listing menu, you will set your settings for the menu which includes the categories listing once you click on it, but also the categories listing once you click on a category of that first categories listing, since you're still on the same menu.
That's how joomla's menu system works.

The system knows the current menu by looking at the Itemid parameter in the URLs. Thus, changing the code which generate the links so that the Itemid becomes different based on the category is totally feasible. I would say that the simplest would be to create a custom field of the table "category" and enter the id of the corresponding menu for each category. Then, edit the file listing_list (if you're using the list layout) of the view "category" via the menu Display->Views and change the link for the categories so that it used the custom field value instead of the Itemid of Joomla.

Why can't I control this on category level, and why isn't there any way to select a layout or an HTML override at Category settings?
That's not that we don't want you to do it. That's something we would like to have in HikaShop too, but we didn't had the time yet to add these features in HikaShop. It will come, but as you can see, we already have to keep up with all the support.

Last edit: 13 years 2 months ago by nicolas.
The following user(s) said Thank You: jansuhr

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

  • Posts: 182
  • Thank you received: 15
13 years 2 months ago #43124

To make an easy workaround I made an Joomla article page for the webshop root with links to each subcategory. That makes it a little closer to what I want for the moment.

I just had to get it live and it now is at www.colorconsult.se

I will try your suggestion with a custom field and see what happens.

Now you can go back to work on future versions ;)

Thanks

Jan

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

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
13 years 2 months ago #43149

We pushed out a new version today ;)

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

Time to create page: 0.141 seconds
Powered by Kunena Forum