OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
Sort Newest to Oldest, Cat View, forum post wrong (0 viewing) 
VehicleManager component support
Go to bottom Favoured: 0
TOPIC: Sort Newest to Oldest, Cat View, forum post wrong
#18469
sethwcaton (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Sort Newest to Oldest, Cat View, forum post wrong 9 Months, 2 Weeks ago Karma: 0  
Edit: Whoops, somehow logged in as sethwcaton. My correct username is catondesigngroup - sorry!

Please advise how to sort by year newest to oldest with current code in vehiclemanager.php - I am looking in vehiclemanager.php and finding this code below, how do I modify it, or what do I modify to sort by year newest to oldest in category view?

This very old post shows how to sort category view by year, but code is wrong for current VehicleManager files:
ordasoft.com/Forum/VehicleManager-compon...t-Inventory.html#968

Code:

  case 'alone_category':
  case 'showCategory':    
      if (version_compare(JVERSION, '3.0', 'ge')){
        $menu = new JTableMenu($database);
        $menu->load($Itemid);
        $params = new JRegistry;
        $params->loadString($menu->params);
      } else{
        $menu = new mosMenu($database);
        $menu->load($GLOBALS['Itemid']);
        $params = new mosParameters($menu->params);
      }
      $layout = $params->get('categorylayout', '');
      if ($layout == '' && isset($catid) && $catid != 0){
        $query = "SELECT params2 FROM #__vehiclemanager_main_categories WHERE id =".$catid;
        $database->setQuery($query);
        $params2 = $database->loadResult();
        $object_params = unserialize($params2);
        if($object_params && $object_params->alone_category!='')
        $layout = $object_params->alone_category;    
      }
      if ($layout == '')
        $layout = $vehiclemanager_configuration['view_type'];
        if(empty($layout))$layout = 'default';
      if ($catid){
        PHP_vehiclemanager::showCategory($catid, $printItem, $layout);
      }else{
        if (version_compare(JVERSION, "1.6.0", "lt")){
          $catid = $params->get('catid');
        } else if (version_compare(JVERSION, "1.6.0", "ge") && version_compare(JVERSION, "3.5.100", "lt")){
          $single_category_id = ''; // for 1.6 
          $single_category_id = $params->get('single_category');
          if ($single_category_id > 0)
              $catid = $single_category_id;
        }
        PHP_vehiclemanager::showCategory($catid, $printItem, $layout);
      }
      break;

 
Logged Logged  
 
Last Edit: 2016/02/22 17:11 By sethwcaton. Reason: Used wrong username to make post
  The administrator has disabled public write access.
#18493
Taras (Admin)
Admin
Posts: 2858
graphgraph
User Offline Click here to see the profile of this user
Re:Sort Newest to Oldest, Cat View, forum post wrong 9 Months, 2 Weeks ago Karma: 55  
Hello,

In Vehicle Manager - Joomla automotive extension we have sort by title, date, price, model.

You can use that.

If you want new features, for example sort by year newest to oldest it will be customization service.

To get more details, please contact us using below form

ordasoft.com/contact-us-form

thanks
 
Logged Logged  
  The administrator has disabled public write access.
Go to top
What are you looking for?
Anti-spam question: How many eyes has a typical person?