Virtuemart Transmenu sh404sef fix
This post is to highlight the fix for Transmenu, due to which the urls are not generated for the sub menu items correctly when inside the sub-categories.
The edit needs to be made in the following file
modules/mod_virtuemart/vm_transmenu/transmenu.php
Search for the following text in the file:
//echo "$row->name $row->link $level<br>";
if ($level){
$pmenu = "tmenu$row->parent";
//echo "$pmenu.addItem(\"$row->name\", \"$row->link\");\n";
$active = 0;
if ( in_array($row->id, $this->parent->open) ) $active = 1;
echo "$pmenu.addItem(\"$row->name\", \"$row->link\", $row->browserNav, $active);\n";
}
in the function ‘genMenuItem’.
After the
If (in_array($row->id, $this->parent->open) ) $active = 1;
line, add the following line
$row->link = $sess->url( SECUREURL . $row->link);
That’s it! This should fix the issue and you should be able to happily use the sh404sef plugin with transmenu!
September 25th, 2009 15:20
Thanks for this little trick. I was loooking for the solution for days until now. Your solution works with his: http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions/7512/details
and this too:
http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions/6879
September 25th, 2009 15:33
@Joey:
you’re welcome! There’s a cleaner fix possible but since this just works, I posted this!
March 23rd, 2010 10:38
Hi, admin.
Thanks for the info.
I am using 1.5.12(i think) and vm 1.1.4 ans sh404sef. 1.5.12 already contains that line but it does not show correct page for the subcategories. I had to turn off joomla SEO option in global configuration page. Otherwise it won’t work. Do you know how to solve the problem?
Thank you.