News:

Support the VirtueMart project and become a member

Main Menu

old menu assigned to VirtueMart v2 product details page

Started by sutinse, December 15, 2013, 18:16:54 PM

Previous topic - Next topic

sutinse

Hi.

Do anyone know how menuitem mapping works in Joomla an VM 2?

My versions are
Joomla v2.5
VirtueMart v2

I have done
1. VM 2 category has mapped to Joomla menu item, everything works fine
  - category menu item is like: /someOriginalMenuItem/
  - and when user clicks "Show product details" url is: /someOriginalMenuItem/someProduct-details
everything works

2. But for SEO (international characters was problems), I have made new menu and batch copied all Joomla menuitems to new menu
3. Then is created new menu module and attached to new menu
4. Old menu is still available, but menumodule that shows that is not published

Now when user click category menu item url is:
/someNewMenuItem/
it shows all products in category ok

But when user clicks "Show productc details", he/she get
/someOriginalMenuItem/someProduct-details

So new menu is not open (user have to press back button).

Is there "some" mapping somewhere where VM details are mapped to menu item?
I'll tried to find from tables, but I don't find anything.

I tried to change components\com_virtuemart\views\category\tmpl\default.php
<?php // Product Details Button
     echo JHTML::link ($product->link, JText::_ ('COM_VIRTUEMART_PRODUCT_DETAILS'), array('title' => $product->product_name, 'class' => 'product-details'));
?>

to
$url = JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id='. $product->virtuemart_category_id); ?>
<a href="<?php echo $url ?>" class="product-details" title="<?php echo $product->product_name?>"><?php echo JText::_ ('COM_VIRTUEMART_PRODUCT_DETAILS') ?> cat:  <?php echo $product->virtuemart_category_id ?></a>

but i procedures same mapping than original.