Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Responsive Joomla Virtuemart Template - SportMart (SKU# FLEX-00019)

TOPIC: next / previous button issue

next / previous button issue 9 years 2 months ago #12003

Hello,

i have a sportmart installation but the next/ previous button on product view is not working properly. I have set up a custom order of the products from virtuemart backend and also disabled AJAX from product view. The same happens if i don't set custom order. The buttons work, but the order is completly random and will not show most of the products. e.g on a category having 15 products the buttons will cycle between 2 or 3 products.

for your reference: eshop.anthraxpaintball.com
The administrator has disabled public write access.

next / previous button issue 9 years 2 months ago #12033

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.
The administrator has disabled public write access.

next / previous button issue 9 years 2 months ago #12088

Hi again,

Thank you for your reply. I've done some research before posting here. The issue seems to be there even with products that are not in multiple categories. Most of the products are single category. Will look some more at virtuemart forum although i've done it already.
The administrator has disabled public write access.

next / previous button issue 9 years 1 month ago #12127

As i have told you before, we are not using anything specifically action or function in our templates in terms of gathering neighbor products. It is all Virtuemart Core related procedure.

There is absolutely nothing we can do about it.

regards.
The administrator has disabled public write access.
Time to create page: 0.113 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo