[SOLVED]Product navigation completely wrong in VM2, rev 5302

Started by patrik60, January 21, 2012, 18:02:19 PM

Previous topic - Next topic

patrik60

The product navigation in product details doesn't work properly:

I have product a, b, c, d, e, f, g, h, sortet by name. Whe I go now to product detail of product "a" the navigation starts to the left instead to the right and shows product "c" ( <- c ). There in the navigation I see product "e" directed to the left and product "a" to the right. (<- e       -> a )

So there are two errors: 1. The navigation goes to the wrong direction. 2. Only every second product will be shown. (If I start with product "b" the navigation goes to product "d")

Can anybody confirm this problem? It worked fine with VM 2.0.0

Regards Patrik

patrik60

#1
I have still this problem. I am now on VM 2.0.1 rev 5339. Isn't this a bug?? As soon as I go down to the official VM 2.0.0 release, the problem disappears.

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

patrik60

Yes, they are in the wrong order as I tried to descrihe above.

design609

Yes the previous / next arrows are going by Product ID and not the ordering set in the config of ordering on category view.

patrik60

#5
It is correct that the neighbour products start alphabeticly in order of the name.

The errors are the following:


  • neighbour products should start to the right on the right upper corner. They don't, instead they start on the left upper corner to the left.
  • Only every second product appears ( e.g. "a , c , e , g...)



Milbo

So which order is to choose then?

the manual ordering? I think it should depend on the selection you did before in the category view.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

patrik60

#7
Ok, I have atached two pics. the "correct" shows the correct order of the neighbour products: to the left you go to the previous product. to the right you go to the next product.

after uppdating the "wrong" pic shows the following: to the left you go to the after next product, to the right you go to the pre-previous product.

It doesn't matter which order is selected in the category overview. The neighbour products always follows in alphabetic order. back to the left, forward to the right.

This doesn't work any longer in newer versions than 2.0.0. In the old VM 1.1 it was depending on the selection in category view.

[attachment cleanup by admin]

patrik60

I'm now on rev 5409. I have seen that there have been some changes. But there are new problems now: Back and Forward arrows are working now properly (left=back, right= forward). But now always only the first and the last product of a category (in alphabetic order) are shown in the product navigation ! it doesn't matter, which kind of order is selected in the category view.

Milbo

oha shit, too small sample, sorry. I take a look, it is an interesting part.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

patrik60


design609

Please anyone... state a public code solution of this issue I guess I am not the only one that have this issue and cannot use the SVN.

So that productdetail page can have a proper function next/previous navigation
It is not working for me in 2.0.1F(and E) (actually more bad than in 2.0.0 ?!)
Only two products are available: the first and the last of that category (a-z)

And please no "its fixed in SVN" I cannot bear to wait for yet another update to find something working before, is now broken in the new version...
:) So I really hope this is possible with a quick fix.

The code I see changed in /productdetails/default.php is:
Quote<?php
    // Product Navigation
    if (VmConfig::get('product_navigation', 1)) { ?>
    <div class="product-neighbours">
       <?php
       if (!empty($this->product->neighbours ['previous'][0])) {
      $prev_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['previous'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id);
      echo JHTML::_('link', $prev_link, $this->product->neighbours ['previous'][0]
         ['product_name'], array('class' => 'previous-page'));
       }
       if (!empty($this->product->neighbours ['next'][0])) {
      $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);
      echo JHTML::_('link', $next_link, $this->product->neighbours ['next'][0] ['product_name'], array('class' => 'next-page'));
       }
       ?>

But I am not a coder and do not know what these
  • means that arrived.
    And it seems if I remove them (same as VM2.0.0) the navigation disappears.

    System:
    J. 1.5.25
    VM 2.0.1E and VM 2.0.1F

    Thanks.


Milbo

It is in the last version, it is updated, installer is available.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

seeker862

I'm having this same problem in VM 2.0.6.  I can sort the products by SKU or custom order, and they are displayed correctly on the Category page.  However, on the Product Details, the next/prev links go to in seemingly random order.

hdepo

My product navigation works only with produtcs name, so the prev/next button show the the prev/netx product by alpabetical order of produtcs name in category.

The product are displayed correctly on the Category page (by product AZ)