VM categories - no title or description

  • larry
    Inactive member
  • Topic Author
  • Member
  • Member
More
11 years 5 months ago - 11 years 5 months ago #30725 by larry
Joomla 2.5.11. Virtuemart 2.0.20b with multi-level categories. eCommerce Template with Hotstart. Site url: www.bwd4.com

The category descriptions do not show and, except for the top shop category, the category of categories titles do not show. They do for an individual category, but not a category of categories.

In .../templates/hot_ecommerce/html/com_virtuemart/categories/default.php at line 43 I added:

<h1><?php echo $this->category->category_name; ?></h1>
<div class="category_description">
<?php echo $this->category->category_description; ?>
</div>

but they still do not show. I tried putting in only the php code for the description, but no good. I tried adding the same code to the com_virtuemart categories page also, but no-go. In Configuration, I tried switching between the default template and the eCommerce template, to no avail. I've checked all Joomla article/category and menu settings.

I am flummoxed that putting in the php code doesn't work. Thank you.
Last edit: 11 years 5 months ago by larry. Reason: typo

Please Log in to join the conversation.

More
11 years 5 months ago #30730 by ivan.milic
FOr single category page you need to add that also to:

/templates/hot_ecommerce/html/com_virtuemart/category/default.php

Please Log in to join the conversation.

  • larry
    Inactive member
  • Topic Author
  • Member
  • Member
More
11 years 5 months ago #30735 by larry
That's the crazy thing. That code is already in the file you mention at lines 172-176 so the Title and Description already work fine for single category. It's the category of "categories" pages where they don't show. That's where I added the same code, but the Title and Description still don't show. I've tried putting it in different code lines, but none seem to work.

Please Log in to join the conversation.

  • larry
    Inactive member
  • Topic Author
  • Member
  • Member
More
11 years 5 months ago #30740 by larry
Well, the answer is I'm an idiot. When setting the Menu Type, I used "Category Layout" for all categories. For categories of categories, you have to use "Virtuemart Categories Layout" even though the Tooltip says "To set the parent category." If I add the code indicated earlier and use the correct menu type selection, the title and description show.

Sorry about that. Boo to unclear directions.

Please Log in to join the conversation.

  • larry
    Inactive member
  • Topic Author
  • Member
  • Member
More
11 years 5 months ago #30747 by larry
Spoke too soon. All works fine when accessing categories of all levels directly from menu. However, when a category is showing a display of subcategories, the url for the subcategories has the higher category name twice in the url, so the links are bad to the subcategories if they are also categories of categories. URLs show double category name such as: .../shop/jewelry/jewelry/costa-rican-wooden-jewelry

So, as in the template demo, top level category display works and bottom level single category display of products works, but the problem is when there are four or more levels of categories - the middle categories of categories repeat the name of the higher category, breaking the URL, so you just get kicked to the overall VM page.

The duplication also shows in breadcrumbs: Home > Shop > Jewelry > Jewelry

All this still happens even when I remove the added code and clear all caches.

Please Log in to join the conversation.

  • larry
    Inactive member
  • Topic Author
  • Member
  • Member
More
11 years 5 months ago - 11 years 5 months ago #30754 by larry
For those who need to use multiple levels of categories, here is the solution:
  1. For multi-level categories, you can't use Virtuemart Categories Layout in the menu on all the levels down to the final product category or you get doubling of the category name in the url, which breaks it. You have to use Category Layout on the second level. Like:
    Top shop level - Virtuemart Categories Layout
    Level 2 category - Category Layout
    Level 3 category - Virtuemart Categories Layout
    Level 4 category - Virtuemart Categories Layout
    Final product category - Category Layout
  2. To line 43 in .../templates/hot_ecommerce/html/com_virtuemart/categories/default.php and line 83 in /templates/hot_ecommerce/html/com_virtuemart/category/default.php add the following code:

    <h1><?php echo $this->category->category_name; ?></h1>

    <div class="category_description">
    <?php echo $this->category->category_description ; ?>
    </div>

    This adds the page category title and category description to the Virtuemart Categories Layout and the Category Layout pages.
I tested this on the VM version that comes with the eCommerce template and on the upgraded VM 2.0.20b. It appears to be VM related and has nothing to do with the eCommerce template itself.
Last edit: 11 years 5 months ago by larry. Reason: more info
The following user(s) said Thank You: ivan.milic

Please Log in to join the conversation.

Time to create page: 0.280 seconds
Powered by Kunena Forum