Author Topic: Virtuemart 2.0.26 sorting work not correct  (Read 1671 times)

VlaKur

  • Beginner
  • *
  • Posts: 9
Virtuemart 2.0.26 sorting work not correct
« on: December 25, 2013, 19:11:29 pm »
Sort at category page work not correct, if change sort field and after bact to sort field selected as default at admin page? sort work no coorect....
Sample if on demopage http://demo.virtuemart.net/index.php/2012-01-13-09-33-20/virtuemart-category-layout/by,product_name
select sort by category? after back to sort by name - it is don'n work...
at my site also.
Virtuemart 2.0.26
try do it at your site, I think you will also....
have any ideas?
 :-\

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9838
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Virtuemart 2.0.26 sorting work not correct
« Reply #1 on: December 26, 2013, 22:13:34 pm »
Check the demo page again. the Sorting "works". just one product is wrong sorted and I will check that before new year.
you may read here the history http://forum.virtuemart.net/index.php?topic=120284.msg412813#msg412813

here some tips if it does not work http://forum.virtuemart.net/index.php?topic=114610.0
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

VlaKur

  • Beginner
  • *
  • Posts: 9
Re: Virtuemart 2.0.26 sorting work not correct
« Reply #2 on: December 29, 2013, 11:03:28 am »
 :)
Thank You for answer.
but i think that sort don't work :)


I select by "Price" default sorting
thereafter select category1, then select sorting order  no "default sorting" (sample Name), then change category and I see, sort no work, it still sort by "name", but at order list selected default sort order by price... and next change sorting no work goods.

problem at this code
file product.php

row 154 ...

it get from cache last sorting order, but when change category this is no actual value


                 $filter_order = JRequest::getString ('orderby', "0");
         if($filter_order == "0"){
            $filter_order_raw = $this->getLastProductOrdering($this->_selectedOrdering);
            $filter_order = $this->checkFilterOrder ($filter_order_raw);
         } else {
            vmdebug('my $filter_order ',$filter_order);
            $filter_order = $this->checkFilterOrder ($filter_order);
            vmdebug('my $filter_order after check',$filter_order);
            $this->setLastProductOrdering($filter_order);
         }


exchange

$filter_order = JRequest::getString ('orderby', "0");
$this->setLastProductOrdering($filter_order);


this is similar works... or may be I don't right?

thanks to you all!


Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9838
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Virtuemart 2.0.26 sorting work not correct
« Reply #3 on: December 29, 2013, 11:06:41 am »
It is on purpose that changing the category sets the again the default ordering.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

VlaKur

  • Beginner
  • *
  • Posts: 9
Re: Virtuemart 2.0.26 sorting work not correct
« Reply #4 on: December 29, 2013, 11:10:52 am »
if change category, using no default sort - default sort don't work more.