Author Topic: Product next/previous navigation looping  (Read 1893 times)

julash

  • Beginner
  • *
  • Posts: 35
Product next/previous navigation looping
« on: September 13, 2017, 08:18:35 am »
Hi,

Not sure if this is a bug. Product navigation not working with a loop of same 2 product. I found this problem also on virtuemart demo site. Check http://demo.virtuemart.net/skirt-knock-rock-detail or http://demo.virtuemart.net/cap-baseball-detail and try going next/previous products. At some point both next/previous keep looping in same products.

First found the problem on a website I am developing with virtueMart 3.2.2 and joomla 3.7.4.

Thanks
Julash

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 294
    • Audio Store
Re: Product next/previous navigation looping
« Reply #1 on: September 13, 2017, 09:54:22 am »
I can not confirm this. The switching of demo site products works well.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2451
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Product next/previous navigation looping
« Reply #2 on: September 13, 2017, 10:01:07 am »
Hello

I can confirm the faulty behaviour.

Choose cowboy hat and click on next. Now You start looping between Safety helmet nad Cap baseball.
Choose skirt and click on next. Now You start looping between Dress shirt with tie and T-shirt Classic blue.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 294
    • Audio Store
Re: Product next/previous navigation looping
« Reply #3 on: September 13, 2017, 10:23:34 am »
Oh yeah. That's right. Cool.  :)
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4065
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Product next/previous navigation looping
« Reply #4 on: September 13, 2017, 23:49:31 pm »
Simply click on "previous" product and you see it loop from H20 Jacket to Skirt to H20 Jacket ....

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Product next/previous navigation looping
« Reply #5 on: October 23, 2017, 13:37:13 pm »
The problem is here, that the ordering must be correctly determined, else you get this effect. It is very hard to avoid it. The real solution would be an own temporary list keeping the product order. Please check the demo here http://demo.virtuemart.net/ghd-2-07-detail

The reason is, that any call to the db is new and has no knowledge about the last. So the real order can differ from call to call. The sql executes the same as for the browsing view, just with an extra filter, which excludes the current product.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

shyntaxx

  • Beginner
  • *
  • Posts: 35
    • Motorola unlock
Re: Product next/previous navigation looping
« Reply #6 on: May 29, 2019, 09:55:04 am »
Hi,

I am not sure if I understand the solution here .. Could you please explain a littlebit more .. ? Whats should I do in order so the product navigation won't between two items ?

I am using Joomla! 3.9.6 | VirtueMart 3.4.2 | Shaper_helix3 template

Best regards.

shyntaxx

  • Beginner
  • *
  • Posts: 35
    • Motorola unlock
Re: Product next/previous navigation looping
« Reply #7 on: May 29, 2019, 10:01:31 am »
Okay I've just solved it by setting:

Default product sort order: Product name
Default category sort order: Ordering, Name

It doing its job now properly!

pellegrinoL

  • Beginner
  • *
  • Posts: 39
Re: Product next/previous navigation looping
« Reply #8 on: June 05, 2019, 11:10:05 am »
Hi,

I am having the same issue, I have set category order "price ascending" and also in the product category I have ordered by price (see Pic) but after some products, there is the loop between the 2 products...

Is there any possibility to solve it?

Best

I am using:
J: 3.8.13
VM: 3.4.3 10005

pellegrinoL

  • Beginner
  • *
  • Posts: 39
Re: Product next/previous navigation looping
« Reply #9 on: June 17, 2019, 10:06:36 am »
Hi If i use the solution proposed by shyntaxx
Okay I've just solved it by setting:

Default product sort order: Product name
Default category sort order: Ordering, Name

It doing its job now properly!


It works, but I would order the products in the category by price and not by name. When I change this option, there is again the loop.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4065
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Product next/previous navigation looping
« Reply #10 on: June 17, 2019, 13:18:51 pm »
The problem is that code used by Virtuemart. It need a little more complex query but the team dont try to solve this since now many years.

pellegrinoL

  • Beginner
  • *
  • Posts: 39
Re: Product next/previous navigation looping
« Reply #11 on: June 18, 2019, 10:02:20 am »
Many thanks for answering!

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Product next/previous navigation looping
« Reply #12 on: June 18, 2019, 11:05:33 am »
There might be the possibility to push that feature with a VirtueMart Supporter Membership.

There is so much work going on that some features just get put on a hold, if the main function - that is mostly used - works.

That membership thing worked in the past for my customers, so you might just ask iStraxx or send them a ticket at extensions.virtuemart.net.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.