VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: soura123 on March 28, 2014, 10:02:58 AM

Title: order created_on by DESC and price by ASC
Post by: soura123 on March 28, 2014, 10:02:58 AM
Near line 397   after: default;
               if (!empty($this->filter_order)) {
                  $orderBy = ' ORDER BY ' . $this->filter_order . ' ';


/* 20130529 begin code cast-art siwtch direction if order is created_on*/   
      $a=$this->filter_order;
      $b=$this->filter_order_Dir;
     
        if ($a=="`p`.created_on"&&$b=="DESC")
            {
           $this->filter_order_Dir="ASC";
           }
        else
            {
               if ($a=="`p`.created_on"&&$b=="ASC"||$filter_order=="`p`.created_on"&&$b=="")
                {
                  $this->filter_order_Dir="DESC";
            }
            }               
      /* end code cast-art */


i use the above hack to sort category on created_on by desc and price by ASC it is working but only the first time browser opens the category if user change the sort price and then by creation date again the hack doesnt work... is there any other way to do this sorting???

thanks in advanced

i use joomla 2.5.18 and VM 2.0.24c
Title: Re: order created_on by DESC and price by ASC
Post by: Milbo on March 29, 2014, 10:03:49 AM
I think the solution in your case is just to update and use the new config settings.
Title: Re: order created_on by DESC and price by ASC
Post by: soura123 on April 10, 2014, 07:57:12 AM
hello and thanks for your reply... i m already testing the 2.6.0 version but i do not see any config settings of what we want is there sth i do not see???

thanks