VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: VlaKur on December 25, 2013, 19:11:29 PM

Title: Virtuemart 2.0.26 sorting work not correct
Post by: VlaKur 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?
:-\
Title: Re: Virtuemart 2.0.26 sorting work not correct
Post by: Milbo 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
Title: Re: Virtuemart 2.0.26 sorting work not correct
Post by: VlaKur 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!

Title: Re: Virtuemart 2.0.26 sorting work not correct
Post by: Milbo on December 29, 2013, 11:06:41 AM
It is on purpose that changing the category sets the again the default ordering.
Title: Re: Virtuemart 2.0.26 sorting work not correct
Post by: VlaKur on December 29, 2013, 11:10:52 AM
if change category, using no default sort - default sort don't work more.