Author Topic: Where does this path segment in the category URL come from?  (Read 229 times)

bcohen0

  • Beginner
  • *
  • Posts: 9
Virtuemart 3.2.2:  In the category accordion menu in my site, the menu links have a path segment that my main menu does not have, and it's causing me some difficulty. For example, the top menu selection might link to, index.php/products/product_cat    , whereas the link for the menu item in the category accordion menu says index.php/shop/products/product_cat .    That element "shop" also shows up in the breadcrumbs, and is selectable, and when it's selected it goes to a particular view that I don't want.  Can someone tell me, is it my template which is inserting "shop" into the url, or is this something that Virtuemart does?   


bcohen0

  • Beginner
  • *
  • Posts: 9
Re: Where does this path segment in the category URL come from?
« Reply #1 on: June 30, 2017, 05:35:32 am »
OK, so What I am noticing is that only SOME of my menu subitems get this "shop" path segment stuck into them. The rest of them look proper. I just created some new subitems, and they don't have this problem. And, oddly, some submenu items don't have this "shop" path segment stuck into them, when they are under parent items that do! Now, I'm wondering if this is the result of an upgrade to virtuemart?  Please can some guru comment?

bcohen0

  • Beginner
  • *
  • Posts: 9
Re: Where does this path segment in the category URL come from?
« Reply #2 on: June 30, 2017, 22:32:24 pm »
OK, further on down the road now, I have discovered that the problem occurs only for category elements for whom manufacturers have been selected. When I de-select the manufacturer, the problem goes away.  I've traced it into the com_virtuemart/router.php, but not farther, yet.  Are manufacturers NOT intended to be placed on categories, but only on individual products?

bcohen0

  • Beginner
  • *
  • Posts: 9
Re: Where does this path segment in the category URL come from?
« Reply #3 on: July 01, 2017, 22:18:52 pm »
Even further down the road, now, the problem happens in com_virtuemart/router.php, around line 840:

      self::$_instance->query = $query;
      if(!empty($query['Itemid']) and $query['Itemid']!=self::$_instance->Itemid){
         self::$_instance->Itemid = $query['Itemid'];
         self::$_instance->setMenuItemId();
      } else {
         //self::$_instance->Itemid = vRequest::get('Itemid',false);
         //vmTrace('No item id in query');
      }

There is a Menu in _instance that has an id that isn't getting updated. $query['Itemid'] is 121, and by this point in the code, the $_instance->Itemid has been set to 121. Therefore this code isn't executed, and setMenuItemId() isn't called. It has an id setting of 192 at the time. Later on, it is queried for the Menu, and so is sent that 192, instead of the 121 that I need it to be.

Being a noob, I'm perfectly willing to accept that there's a good reason for this. I'd like to know it though.

And thank you for moving this post where it belongs. I'm so new, I didn't know that's what this was about until now.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26055
  • Always on vacation
    • Jenkin Hill Internet
Re: Where does this path segment in the category URL come from?
« Reply #4 on: July 02, 2017, 00:21:12 am »
There is a revised router which should be coming in VM3.2.4    Related to http://forum.virtuemart.net/index.php?topic=137842.msg483115#msg483115
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

Now away on vacation