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!

3 Responses to “Virtuemart Transmenu sh404sef fix


Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word