VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: andrewm57 on May 28, 2014, 03:55:19 AM

Title: Mfg detail layout, SEF & JTree confusion
Post by: andrewm57 on May 28, 2014, 03:55:19 AM
I wanted to use mfg links in articles, so I created a hidden 'manufacturers' menu with a Mfg Detail Layout link for each mfg. I then linked to the menu items using JTree in the articles.

http://fineleatherfurniture.com/save-on-leather-furniture

For the 'Leathercraft' link, the linked page is:

http://fineleatherfurniture.com/leathercraft/details

but it - and all mfgs link pages - is a Mfg Default layout of all mfgs, not a Mfg Details page.

If I leave those links and menu items but unpublish the menu items, I get the correct Mfg Details page, but a convoluted URL:

http://fineleatherfurniture.com/leather-furniture/manufacturers/leathercraft/details

However that looses any control over Title & Meta options.

If I munge the original SEF URL to remove the /details, I get the correct Mfg Details page:

http://fineleatherfurniture.com/leathercraft

How can I get the article links to work correctly?

J 2.5.19, VM  2.6.4
Title: Re: Mfg detail layout, SEF & JTree confusion
Post by: GJC Web Design on May 28, 2014, 10:18:51 AM
yes indeed - does appear that the standard SEF is wrong for the manufacturer links

made a hidden menu to a man detail page
/index.php?option=com_virtuemart&view=manufacturer&layout=details&virtuemart_manufacturer_id=1&Itemid=164

used that in a link in content

with SEF off works fine

with SEF on becomes   manu/details  (depending on the hidden menu title and alias of course) but leads as you say to the VirtueMart » VirtueMart Manufacturer Default Layout   

on that overview the SEF url is /manu  to the wanted manufacturer

A menu to the "VirtueMart » VirtueMart Manufacturer Default Layout"  gives   /mans  (again of course dependent on menu alias)
Title: Re: Mfg detail layout, SEF & JTree confusion
Post by: GJC Web Design on May 28, 2014, 10:36:11 AM
If you look in components/com_virtuemart/router.php ~ lines 600 you will see this commented out

// if (isset($helper->activeMenu->virtuemart_manufacturer_id))
// $vars['virtuemart_manufacturer_id'] = $helper->activeMenu->virtuemart_manufacturer_id ;


if I enable it

if (isset($helper->activeMenu->virtuemart_manufacturer_id))
$vars['virtuemart_manufacturer_id'] = $helper->activeMenu->virtuemart_manufacturer_id ;


my SEF urls as above work perfectly