Problem with Virtuemart navigation and breadcrumbs
snippio:
Hello,
Just replace the function vmAppendPathway (in mainframe.class.php) by this one (starts on line 354):
function vmAppendPathway( $pathway ) {
global $mainframe;
// Remove the link on the last pathway item
$pathway[ count($pathway) - 1 ]->link = '';
if( vmIsJoomla('1.5') )
{
if(count($pathway)>1)
{ $cmsPathway =& $mainframe->getPathway();
$i=0;
foreach( $pathway AS $item) {
if($i>0)
{ $cmsPathway->addItem($item->name, str_replace('&', '&', $item->link) );
}
$i=$i+1;
}
}
} else {
$tpl = vmTemplate::getInstance();
$tpl->set( 'pathway', $pathway );
$vmPathway = $tpl->fetch( 'common/pathway.tpl.php' );
$mainframe->appendPathWay( $vmPathway );
}
}
This is a 100% fix. It works for unlimited productlevels and the Virtuemart breadcrumb keeps working.
Make me happy and please report whether this was a usefull tip!!!
Bye!
Thijs
shanepetty:
snippio,
thanks for the fix. Worked like a charm for the issue we were having in a product category with more than one page. VM would not let the user navigate back to previous pages.
Shane
shafee85:
Quote from: chummerz on October 14, 2006, 13:31:03 PM
Hi,
the problem is that when clicking through to the virtuemart component through the module via About Us etc, Joomla takes virtuemart onboard as though it's a main menu link. The best way to solve this problem is to establish that Joomla is a separate Menu entity.
This is done via these steps.
- Login to Joomla Admin
- Goto Menu Manager and create a new Menu with Module Title.
- Click on the Menu Item you just created to add a link
- Create a new link to the Virtuemart Component. The name of the link is important as that will show in the breadcrumbs/pathway. Say "My Shop"
- You don't need to publish the module but it is important that you publish the link in the menu administration so Joomla will recognize it and will take into account the Virtuemart set of links.
Now everytime you are in the Virtuemart component you will have a breadcrumb base of " Home > My Shop > $currentPage "
Regards
Worked like a charm mate. Thank you very much for this tip :)
qingpool:
Thank You Chummerz!
dankrmp:
Excellent fix - thanks so much!
Navigation
[0] Message Index
[*] Previous page