Language

English
Double Pathway VM 1.1.3 Print E-mail
Written by myOltrans    Sunday, 28 June 2009 06:53    Last Updated on Sunday, 28 June 2009 07:16

Problem

There is VM 1.1 and JOOMLA 1.5 installation, with a Joomla menu including VM categories. While surfing on the Joomla menu the pathway is doubled.

Example: Women/Accessories/Brooches/Accessories/Brooches

Solution

Apply this change: (only for Joomla 1.5 & php 5 (because of 'stripos' only available on php 5)).

Go & open : administrator\components\com_virtuemart\classes\mainframe.class.php. First of all make a backup of this file.

Change the function "function vmAppendPathway( $pathway ) {..." by this one :

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('&', '&', basename($item->link)) );
                }
            }
        } else {
            $tpl = vmTemplate::getInstance();
            $tpl->set( 'pathway', $pathway );
            $vmPathway = $tpl->fetch( 'common/pathway.tpl.php' );
            $mainframe->appendPathWay( $vmPathway );
        }
    }

Resources


blog comments powered by Disqus
 

© Copyright 2008-2011 Oltrans. Translation Agency Recourse Portal.
All rights reserved. Various trademarks held by their respective owners.

Oltrans, 152, 6-ti septemvri Bul., Plovdiv 4000 Bulgaria
General Inquiries: (Bulgaria) +359 32 511 272 | skype: Oltrans.org My status