VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: doorknob on June 07, 2009, 03:41:49 AM

Title: Bug in breadcrumbs generation
Post by: doorknob on June 07, 2009, 03:41:49 AM
The basis for creating the breadcrumbs is to mimic the vm home page and then add additional strings. The code for extracting the home page just extracts all vm menu items and uses the first one. Most of the time this will be the 'home' page but if the 'home' page is deleted and re-created, a different menu item will be selected as the basis for the breadcrumbs. The query needs to be more specific and select the menu item that drives the home page.

ps_session (line 463 in build 1760) should be changed from:
$db->query( "SELECT id FROM #__menu WHERE link='index.php?option=com_virtuemart'
AND published=1");

to:
$db->query( "SELECT id FROM #__menu WHERE link='index.php?option=com_virtuemart'
AND published=1 AND params LIKE '%page=shop.index\\n%'");

Regards
Phil
Title: Re: Bug in breadcrumbs generation
Post by: chrism on June 15, 2009, 13:59:26 PM
Phil,

I suffer from duplicate breadcrumbs here www.getupandgrow.com i'm going though your various posts in an attempt to fix it, from what i'm reading im optomistic, however i cant see the replacement code in the post above?

Thanks
Chris
Title: Re: Bug in breadcrumbs generation
Post by: doorknob on June 15, 2009, 18:29:04 PM
Chris,
It was possible to see the revised code by clicking on the code and using the right arrow on the keyboard but to make it more obvious, I edited the code and put in line breaks
Phil
Title: Re: Bug in breadcrumbs generation
Post by: fire2 on June 15, 2009, 18:42:18 PM
In VM 1.1.3 you won't find those lines in ps_session that need to be replaced. I didn't find them, so I guess it is only in 1.1.4.
Title: Re: Bug in breadcrumbs generation
Post by: doorknob on June 15, 2009, 18:47:37 PM
As I said in my post, I'm using build 1760.
Phil
Title: Re: Bug in breadcrumbs generation
Post by: hotelathome on March 02, 2010, 08:07:42 AM
I found these lines in my vm 1.1.3 and this fix totally worked!!
I had all my breadcrumbs and my URL's for that matter starting with towels (the first product on my menu list)
Now everything is starting with the correct category.
you rock!!!