Tue 27 Oct |
|
Adding the Virtuemart Breadcrumbs to your Browse pages is not native to Virtuemart. Here are the steps and files needed to achieve this.
Even though the $navigation_pathway is shown as Browse Template variable the code to render it is missing from the shop.browse.php file as of VirtueMart 1.1.3.
The first step is to open file administrator/components/com_virtuemart/html/shop.browse.php and look for the the following code - // Set up the CMS pathway $category_list = array_reverse( $ps_product_category->get_navigation_list($category_id) ); $pathway = $ps_product_category->getPathway( $category_list ); $vm_mainframe->vmAppendPathway( $pathway );and then add below it - // Set the pathway for our template - $tpl->set( 'pathway', $pathway ); $navigation_pathway = $tpl->fetch( 'common/pathway.tpl.php'); $tpl->set( "navigation_pathway", $navigation_pathway );//add navigation_pathway to template Now we just need to add the variable call in our browse template so open components/com_virtuemart/themes/default/templates/browse/includes/browse_header_category.tpl.php and add the following snippet directly under the mm_showMyFileName(__FILE__);?> <?php if( $this->get_cfg( 'showPathway' )) { echo "<div class=\"pathway\">$navigation_pathway</div>"; } ?> Now the VirtueMart Breadcrumbs appear on your Browse (Category) pages. You can see it here www.gjcwebdesign.com/outdoor-tools/view-all-products. |
| Last Updated on Tuesday, 27 October 2009 18:31 |

Even though the $navigation_pathway is shown as Browse Template variable the code to render it is missing from the shop.browse.php file as of VirtueMart 1.1.3.































http://98dev.com
this works !!!!!!!
also tryit with flypage
cheers from MX!
thx for this hack!
I followed these tips by adding the code you provided but my breadcrumbs are still not appearing. Do I need to add any adress etc inside the pathway area?
Thanks so much!
Would have to check your site.
Email me thru the contact page..
I figured out that i miss the index.php in the path. See below the example.
Working link.
http://www.mysite.nl/vm/index.php/products?page=shop.browse&category_id=32
Non working link
http://www.mysite.nl/vm/products?page=shop.browse&category_id=32
How can i solve this??
Thanks in advance.
This is a fix to make VM send Joomla's Breadcrumb module the correct info on the product flypage details.
is it possible to add a "home" link before the first category in the bread crumbs?