Author Topic: VirtueMart Category Module Bag  (Read 563 times)

Rsn

  • Beginner
  • *
  • Posts: 15
  • A beginner
    • Legal company LEGION
VirtueMart Category Module Bag
« on: August 07, 2018, 06:47:57 am »
Hello!

VirtueMart Category Module
Joomla 3.8.10
VirtueMart 3.2.14
Joomla Global Configuration:  Search Engine Friendly URLs - Yes
VirtueMart - Configuration - SEO Settings: SEO Enabled, Use Product and Category IDs - No, Use full category tree for product links - No.

On product page the module can't indicate the active menu item.

If Joomla Search Engine Friendly - No, or VM Use full category tree for product links - Yes, then the module works fine.

Please, help!

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: VirtueMart Category Module Bag
« Reply #1 on: August 07, 2018, 14:16:32 pm »
On product page the module can't indicate the active menu item.
It's the problem wen you disable tree.
The menu ID is set by the category, so removing the alias to category in Joomla mean removing the menu ID and no menu is selected

Rsn

  • Beginner
  • *
  • Posts: 15
  • A beginner
    • Legal company LEGION
Re: VirtueMart Category Module Bag
« Reply #2 on: August 08, 2018, 06:16:31 am »
Is there any way to solve this problem?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: VirtueMart Category Module Bag
« Reply #3 on: August 08, 2018, 12:27:36 pm »
A simple way ? I dont think.
Use full category tree then menu ID is set

Rsn

  • Beginner
  • *
  • Posts: 15
  • A beginner
    • Legal company LEGION
Re: VirtueMart Category Module Bag
« Reply #4 on: August 09, 2018, 06:56:26 am »
Use full category tree then menu ID is set

My shop has a complex and long structure of product categories. If I use a tree, url of the products will be very long. So this option is not suitable for me.

I would like to see the official answer from the developers of Virtuemart.

Ghost

  • Jr. Member
  • **
  • Posts: 413
Re: VirtueMart Category Module Bag
« Reply #5 on: August 09, 2018, 08:27:08 am »
On product view, fetch the product and compare against its categories.

Rsn

  • Beginner
  • *
  • Posts: 15
  • A beginner
    • Legal company LEGION
Re: VirtueMart Category Module Bag
« Reply #6 on: August 10, 2018, 07:13:12 am »
On its category view, the parent category is marked in the module.
But on the product view, the parent category is not marked in the module (no "active" class).

This situation is exactly with the settings, that I specified in the beginning of the topic.

Rsn

  • Beginner
  • *
  • Posts: 15
  • A beginner
    • Legal company LEGION
Re: VirtueMart Category Module Bag
« Reply #7 on: August 10, 2018, 07:16:41 am »
On product page the module can't indicate the active menu item.

I meant: it does not indicate the parent category in the module.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: VirtueMart Category Module Bag
« Reply #8 on: August 10, 2018, 18:19:30 pm »
On product page the module can't indicate the active menu item.

I meant: it does not indicate the parent category in the module.
Do you use VM core category module ?

Rsn

  • Beginner
  • *
  • Posts: 15
  • A beginner
    • Legal company LEGION
Re: VirtueMart Category Module Bag
« Reply #9 on: August 13, 2018, 13:41:57 pm »
Do you use VM core category module ?

Standard VirtueMart Category module.

And categories are not related to menu items.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: VirtueMart Category Module Bag
« Reply #10 on: August 13, 2018, 14:59:52 pm »
I do not know if that is possible, I should do tests and it's to long to do(test if the menu item is set, Check if you can manually set it ....)

Rsn

  • Beginner
  • *
  • Posts: 15
  • A beginner
    • Legal company LEGION
Re: VirtueMart Category Module Bag
« Reply #11 on: August 13, 2018, 15:41:51 pm »
I do not know if that is possible, I should do tests and it's to long to do(test if the menu item is set, Check if you can manually set it ....)

Thanks. My question is about the situation, when the menu items are not set manually.

Categories will be many and they will change. It will be difficult to keep menu items manually up to date. That's why I use this module with categories, not just a manually created menu.

Rsn

  • Beginner
  • *
  • Posts: 15
  • A beginner
    • Legal company LEGION
Re: VirtueMart Category Module Bag
« Reply #12 on: August 13, 2018, 15:44:43 pm »
At the moment, I found next way out of the situation:
the definition of the active category using jQuery comparison with links in the breadcrumbs module

Code: [Select]
// current category in left module on product page
$('.view-productdetails .leftmenucat > ul > li > a').each(function() {
        var left_li_a = $(this);
        $('ul.breadcrumb li a').each(function() {
            if ($(this).attr('href') == left_li_a.attr('href')) {
                left_li_a.parent('li').addClass('active');
            }
        });
    });