Author Topic: VM product categories duplicated in breadcrumbs  (Read 20330 times)

Laurelle

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 61
Re: VM product categories duplicated in breadcrumbs
« Reply #15 on: February 25, 2009, 00:22:53 am »
Thank you Mark,

I appreciate you looking into the problem and I know other people will as well.

I knew it was not just a simple fix.

I am going to turn SEF back on now. Please let me know if you need to look at the URLs again and I can turn it back off for you.

Look forward to hearing back on a solution.

Thanks again.


macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: VM product categories duplicated in breadcrumbs
« Reply #16 on: February 25, 2009, 00:57:16 am »
This could be classed as a real clumsy hack, but it is working on my site !!

edit ps_product_category.php at line 1236 you should find

Code: [Select]
function getPathway( $category_list ) {
global $sess;
$pathway_items = array();

foreach( $category_list as $category ) {
$item = new stdClass();
$item->name = vmHtmlEntityDecode( $category['category_name'] );
$item->link = $sess->url( $_SERVER['PHP_SELF'] . "?page=shop.browse&category_id=$category[category_id]", true, false );
$pathway_items[] = $item;
}

return $pathway_items;
}

change it to this

Code: [Select]
function getPathway( $category_list ) {
global $sess;
                $Itemid = $sess->getShopItemid();
$pathway_items = array();
if($Itemid == vmGet( $_REQUEST, 'Itemid', null )) {
foreach( $category_list as $category ) {
$item = new stdClass();
$item->name = vmHtmlEntityDecode( $category['category_name'] );
$item->link = $sess->url( $_SERVER['PHP_SELF'] . "?page=shop.browse&category_id=$category[category_id]", true, false );
$pathway_items[] = $item;
}
}
return $pathway_items;
}

It simply checks to see if the itemid is the proper vm itemid, if it isn't id doesn't add the pathway because joomla has already done it.

A side effect though is that the vm pathway no longer works!

Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.

Laurelle

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 61
Re: VM product categories duplicated in breadcrumbs
« Reply #17 on: February 25, 2009, 01:35:56 am »
Hi Mark,

Getting much closer! Two problems that I have with this hack:
- the first category shows the breadcrumb twice, but other top level categories don't (Living Rooms doesn't work, but the other top level categories do seem to work). But if you go into a sub-category of Living Rooms, you don't have the duplicate breadcrumb
- all of the category and sub-category breadcrumbs have > at the end like there should be something following it and the last item on the breadcrumb is linked (that is the category page that you are on, has a link instead of just text)

I have turned SEF URLs off again, if you need to look at the site again.

Thank you again for your help.

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: VM product categories duplicated in breadcrumbs
« Reply #18 on: February 25, 2009, 01:55:45 am »
I don't have that problem on mine, but I'm using J! 1.5.9 and VM 1.1.13

I wonder if there was something there.

But have you removed that hack you had applied? Maybe thats causing the problem!
Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.

Laurelle

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 61
Re: VM product categories duplicated in breadcrumbs
« Reply #19 on: February 25, 2009, 03:13:12 am »
Hi,

I am running 1.5.9 and VM 1.1.3 as well.

I removed the itemid hack and things are worse. Still have the > at the end of categories and sub-categories. Now I am getting Living Room in the pathway of some sub-folders not in the living rooms category. Example:
Home > Living Room > Sofas & Chairs > Sofas & Loveseats >
should be Home > Sofas & Chairs > Sofas & Loveseats

Whether I get the ending > depends how I go to the category. Using the Joomla menu gives the > on the end, using the VM sub-category link, I don't get the > on the end and the last sub-category is not linked.

Thanks again.

gschorr

  • Beginner
  • *
  • Posts: 3

jmartin82

  • Beginner
  • *
  • Posts: 13
Re: VM product categories duplicated in breadcrumbs
« Reply #21 on: April 22, 2009, 19:27:15 pm »
I am having the same issues. I have the hack from this thread and from vm-expert included, but now when I browse through different categories from the vm category module, the breadcrumbs are not updating, also when I view a product, it is not showing in the breadcrumb as well. Is there anything additional I need to do? I have SEF turned off.

sealion

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 53
    • Spiral Scripts
Re: VM product categories duplicated in breadcrumbs
« Reply #22 on: September 15, 2009, 11:57:03 am »
I was having what I think is the same problem. The breadcrumbs worked fine, except on the product details flypage, where the pathway was repeated. I found the following worked (with Joomla 1.5 and Virtuemart 1.1.3)

in

administrator/components/com_virtuemart/html/shop.product_details.php

comment out the line number 157 ie

//$vm_mainframe->vmAppendPathway( $pathway );

I tried some of the other solutions suggested in this forum, but they removed part of the breadcrumbs that I wanted displayed as well, this approach just removes the duplication on the product details page.

trumpton

  • Jr. Member
  • **
  • Posts: 92
Re: VM product categories duplicated in breadcrumbs
« Reply #23 on: October 12, 2009, 17:10:01 pm »
Thanks for the code. It worked a treat.

RCheesley

  • Jr. Member
  • **
  • Posts: 81
Re: VM product categories duplicated in breadcrumbs
« Reply #24 on: October 04, 2010, 15:01:50 pm »
If that doesn't work try this, which worked for me: http://forum.virtuemart.net/index.php?topic=41749.msg136615