Jump to content

sort does not work on search result


sean1688

Recommended Posts

the sort function does not seem to work on search result, is this a bug or is it normal?

 

our website is http://www.mastechpowersupply.com, if you search for 30V, there are a lot of results. it will be nice to sort the results, and the website does provide that "sort" function, but if you try to sort it, it does not seem to do anything?

 

thank you in advance for your help.

Link to comment
Share on other sites

Please feel free to mention the exact version of CubeCart you are running. It helps to let one know what line numbers to edit.

 

There is an existing bug (https://github.com/cubecart/v5.2.14/issues/147) that messes with the ability to get a sort to happen.

 

In the file /classes/catalogue.class.php, near line 173, try this edit:

Was:
        // Sorting
        $GLOBALS['smarty']->assign('SORTING', ($sorting = $this->displaySort((isset($_GET['cat_id']) && $_GET['cat_id'] == 'sale'))) ? $sorting : false);
 
Now:
        // Sorting
        $GLOBALS['smarty']->assign('SORTING', ($sorting = $this->displaySort(!isset($_GET['cat_id']))) ? $sorting : false);

Hopefully, this fixes your observation.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...