Jump to content

(Solved) Sorting “Tags” search results in Alphabetical order


Recommended Posts

Hi

 

Version 1.5.4.1

 

This was an issue I had in version 1.4.9 and "Shacker" was able to kindly help me resolve the issue.

 

What I am trying to achieve is when you have the tags option active and click on a tag I want the results displayed in alphabetical order. The older resolution of amending classes/tag.php is not applicable now.

 

Any help would be appreciated.

 

G

Edited by JerseyG (see edit history)
Link to comment
Share on other sites

in classes/search.php you've got function:

public static function searchTag($id_lang, $tag, $count = false, $pageNumber = 0, $pageSize = 10, $orderBy = false, $orderWay = false,

with code somewhere inside it:

ORDER BY position DESC'.($orderBy ? ', '.$orderBy : '').($orderWay ? ' '.$orderWay : '').'

change position DESC to pl.name ASC

ORDER BY pl.name ASC'.($orderBy ? ', '.$orderBy : '').($orderWay ? ' '.$orderWay : '').'
  • Like 1
Link to comment
Share on other sites

  • 7 months later...

I'm working on prestashop 1.6 an it doesn't work properly, now it shows in alphabetical order, but per category, so i have something like

category 1:

A

B

C

Category 2:

A

B

C

 

and it doesn't works for me... any help?

Link to comment
Share on other sites

×
×
  • Create New...