Double entry in Joomla Breadcrumbs with VirtueMart 1.1 - Joomla & VirtueMart Tips & How To's

GJC Web Design UK Joomla & VirtueMart how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help

A collection of help articles and coding examples for Joomla & Virtuemart

Belgium, VirtueMart & Joomla Web Design England UK Britain & Germany

Joomla, VirtueMart, how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help When you make a normal VirtueMart category menu a double entry (iteration) appears in the Joomla breadcrumbs.

Home Joomla - VirtueMart Joomla & VM How To's Double entry in Joomla Breadcrumbs with VirtueMart 1.1

Fri

04

Sep

Double entry in Joomla Breadcrumbs with VirtueMart 1.1
  • Joomla 1.5
  • VirtueMart 1.1

When you make a normal VirtueMart category menu a double entry (iteration) appears in the Joomla breadcrumbs.
I found this solution in the VirtueMart forums.


Double entry in Joomla Breadcrumbs with VirtueMart 1.1




If you make a VirtueMart Category menu item via the standard Joomla menu dialogue the breadcrumbs will display a double entry (iteration) for that page.
Thanks to yzedesign for this solution.
It will only work if the menu item name is the same as the category name. It detects the double and drops one of them.

Go to administrator\components\com_virtuemart\classes\mainframe.class.php and find the function "function vmAppendPathway( $pathway )" around line 707 -
 
  function vmAppendPathway( $pathway ) {
 
    global $mainframe;
 
 
 
    // Remove the link on the last pathway item
 
    $pathway[ count($pathway) - 1 ]->link = '';
 
 
 
    if( vmIsJoomla('1.5') ) {
 
      $cmsPathway =& $mainframe->getPathway();
/***** YZEDESIGN HACK ******/
      $whatinpath=',';
      foreach( $cmsPathway->_pathway as $tabpath ) {
        $whatinpath.=','.$tabpath->name.',';
      }
/***** YZEDESIGN HACK ******/
 
      foreach( $pathway AS $item) {
        if (!stripos($whatinpath,','.$item->name.',')){ //********* YZEDESIGN HACK
 
        $cmsPathway->addItem( $item->name, str_replace('&', '&', $item->link) );
 
      }
  }//********* YZEDESIGN HACK
 
    } else {
 


Last Updated on Friday, 04 September 2009 19:28
 

Latest Articles

VirtueMart
Your Cart is currently empty.

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.

Latest Joomla & VirtueMart Tips

See all tips & examples

VM Live Product Search

GJC Web Design UK Joomla & VirtueMart how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help

A collection of help articles and coding examples for Joomla & Virtuemart

Belgium, VirtueMart & Joomla Web Design England UK Britain & Germany

Joomla, VirtueMart, how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help



Double entry in Joomla Breadcrumbs with VirtueMart 1.1|Joomla & VirtueMart Tips & How To's



When you make a normal VirtueMart category menu a double entry (iteration) appears in the Joomla breadcrumbs.


pathway, item, virtuemart, yzedesign, hack, menu, link, cmspathway, whatinpath, joomla, category, double, function, mainframe, vmappendpathway, tabpath, foreach, iteration, entry, breadcrumbs, solution, global, replace, str, remove, count, line, stripos, getpathway, additem, vmisjoomla, administrator, dialogue, display, standard, forums, normal, appears, page, thanks


guru

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.