Author Topic: Pagination broken in category 0(root)  (Read 769 times)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9412
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Pagination broken in category 0(root)
« Reply #15 on: November 16, 2017, 20:53:53 pm »
There is a release, very, very soon.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Pagination broken in category 0(root)
« Reply #16 on: November 28, 2017, 02:15:10 am »
I can confirm that max code fix the bug.

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Pagination broken in category 0(root)
« Reply #17 on: November 28, 2017, 16:39:14 pm »
Sorry, this give another BUG, you cannot return to first page.

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Pagination broken in category 0(root)
« Reply #18 on: December 04, 2017, 14:30:10 pm »
The only way to prevent the new bug is to add in the XML /components/com_virtuemart/views/category/tmpl/default.xml
Code: [Select]
<field name="start" type="hidden" default="0" />
<field name="limitstart" type="hidden" default="0" />
inside the
Code: [Select]
<fieldset name="request" >

</fieldset>
else you cannot return to first page, because the start and limit start is empty and is set from session in the model.

But another problem stay. Any user can set the number of displayed product if this is not higher then $this->_maxItems
i changed protected $_maxItems = 24; because i only use this.
But this should be a config value, i had deny of service warnings on my demo shop, because this(i have a protection on the server to not crash server).
This can simply crash shops, so should be added urgently in Virtuemart, to have always a stable shop, in the config.

You can try for eg. http://pro.st42.fr/en/results,2353-4704, it only display 24 products
Note that because this values is used in all models, so can give some problems(category tree, childs ...) i don't really checked all the code.