Author Topic: [SOLVED]Product navigation completely wrong in VM2, rev 5302  (Read 22035 times)

patrik60

  • Guest
[SOLVED]Product navigation completely wrong in VM2, rev 5302
« on: January 21, 2012, 18:02:19 pm »
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

  • Guest
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #1 on: January 30, 2012, 18:57:16 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10283
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #2 on: January 30, 2012, 22:19:33 pm »
You mean the neighboured products?
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

  • Guest
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #3 on: January 30, 2012, 22:23:31 pm »
Yes, they are in the wrong order as I tried to descrihe above.

design609

  • Jr. Member
  • **
  • Posts: 68
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #4 on: January 31, 2012, 11:06:11 am »
Yes the previous / next arrows are going by Product ID and not the ordering set in the config of ordering on category view.

patrik60

  • Guest
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #5 on: February 02, 2012, 15:44:40 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10283
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #6 on: February 02, 2012, 17:02:58 pm »
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

  • Guest
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #7 on: February 04, 2012, 16:58:28 pm »
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

  • Guest
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #8 on: February 09, 2012, 15:38:52 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10283
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #9 on: February 09, 2012, 22:01:42 pm »
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

  • Guest
Re: Product navigation completely wrong in VM2, rev 5302
« Reply #10 on: February 10, 2012, 14:30:31 pm »
yes, you've got it. works fine now (rev 5413)!

design609

  • Jr. Member
  • **
  • Posts: 68
Re: [SOLVED]Product navigation completely wrong in VM2, rev 5302
« Reply #11 on: February 13, 2012, 09:31:56 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10283
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: [SOLVED]Product navigation completely wrong in VM2, rev 5302
« Reply #12 on: February 14, 2012, 22:31:41 pm »
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

  • Beginner
  • *
  • Posts: 8
Re: [SOLVED]Product navigation completely wrong in VM2, rev 5302
« Reply #13 on: May 09, 2012, 21:09:10 pm »
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

  • Beginner
  • *
  • Posts: 1
Re: [SOLVED]Product navigation completely wrong in VM2, rev 5302
« Reply #14 on: May 14, 2012, 15:19:37 pm »
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)