Hi,
Linking the next or previous product is related to Virtuemart Core. In our templates, we are using the Virtuemart's core object, for example; to get the ID of next product, the code is this:
$this->product->neighbours ['next'][0] ['virtuemart_product_id']
this is the code to get the "link" of the next product.
$next_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['next'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id);
I would recommend you to organize your categories. If products have multiple categories. This will break the next-prev links, Virtuemart might not be able to determine the neighbor products because Virtuemart won't know in what category you are trying to reach the NEXT or PREV products.
As far as i know, if the products are added to one category only, the neighbor product links are working just fine. I buily many VM sites and never experienced this problem. But as i mentioned earlier; there is no way to fix this problem (if there is a problem exist) via template as It is related to Virtuemart Core where the
neighbor object is defined. did you check the
forum.virtuemart.net for this?
Regards.