News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

order created_on by DESC and price by ASC

Started by soura123, March 28, 2014, 10:02:58 AM

Previous topic - Next topic

soura123

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

Milbo

I think the solution in your case is just to update and use the new config settings.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

soura123

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