Virtuemart Transmenu sh404sef fix
Sunday, June 21st, 2009This 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!