News:

Support the VirtueMart project and become a member

Main Menu

Quick View and Double breadcrumbs

Started by ex3mist, October 13, 2015, 09:34:10 AM

Previous topic - Next topic

ex3mist

Hello,

I saw there are a lot of posts about the double breadcrumbs issue but I have this and another one with the products Quick View that I'm using and I think both are conected. That's why I'm posting new topic now. I'm using Joomla 3.4.4 and VM 3.0.10.

So, about the breadcrumbs first:
The module displays the path like: Category > Product > Category > Product. In the URL however it is correct: ../Category/Product.html. I have one and two level categories and products in it. There are menu items in the main menu for each product. Besides the breadcrumbs display and the products Quick View, everything else works fine.

About the Quick View:
I'm using plugin to display quick view popup for the products in the category page. Now it is loading endlessly when the SEF URLs are turned on. When I turn it off, it works as it should. I suppose the problem is the same as with the breadcrumbs - it doesn't find the correct path to display the product's information.

I found this topic: http://forum.joomla.org/viewtopic.php?t=730195 It deals with the double breadcrumbs. The code is a little bit different in VM 3 but if I comment these lines:
if ($category->parents) {
foreach ($category->parents as $c) {
if(is_object($c) and isset($c->category_name)){
$pathway->addItem(strip_tags(vmText::_($c->category_name)), JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $c->virtuemart_category_id, FALSE));
} else {
vmdebug('Error, parent category has no name, breadcrumb maybe broken, category',$c);
}
}
}

and this:
$pathway->addItem(strip_tags(html_entity_decode($product->product_name,ENT_QUOTES)));
then the breadcrumbs are displaied correct. But the Quick View is still not working.

So, that's why I think this is not the "right" sollution. I found this topic about the Artio's JoomSEF extension: https://www.artio.net/support-forums/joomsef/community-support/joomsef-4/double-path-in-the-url. It is written there "disable the "Add menu title to URL" option". Well, I'm not using this or other extension to display SEF URLs, besides the Joomla build in. But I think because I have a menu item to each product, the path is being doubled and that's why the breadcrumbs module and the Quick View plugin are not working correctly.

I'm explaning all this because I hope anyone could give an idea what to check and how to resolve it.

icarust

#1
I'm replying because, unfortunately, I have the same problem with double breadcrumbs on product detail pages.  I've searched, and seen some old hacks that don't seem to apply anymore. I wish I had an answer, but don't, so will be checking back to see if one is posted that will delete the duplicate breadcrumb (i.e. with an updated hack).

VirtueMart 3.0.9.10
Joomla! 3.4.3 Stable

ex3mist

Hello,
I dealed with the double breadcrumbs as I mentioned in the first post - just commented the code shown. If anyone can suggest a different sollutiion, he's welcome.

icarust

#3
ex3mist -

Sorry for the delayed reply...I just implemented your solution for the double breadcrumb problem - and it worked!! 

I hope you get this message and many thanks to you!!  You are a star!  8)

I also hope you get a solution to your second problem which, unfortunately, I have no knowledge of.

Thanks again!!!


MC Web Design

Thank you for the breadcrumbs solution! I've notice that in VirtueMart 3.0.12 the developers have commented the respective code ("//Seems we dont need this anylonger, destroyed the breadcrumb"), but they decided not to remove it. ??? I hope they'll remove the bad code in the next VM release.