Author Topic: Sort ordering in search results  (Read 248 times)

d0ublezer0

  • Jr. Member
  • **
  • Posts: 158
Sort ordering in search results
« on: June 06, 2018, 08:16:30 am »
Hello! VM3.2.12
Is it possible to specify how to sort products after the search?
The default sorting for products is set "ordering" in backend.
After performing the search, I get a list of products in a random (for me) order.
I want to sort products by SKU when searching, .
Here is an example of doing a search for article "210":
https://www.zebra-tara.ru/component/virtuemart/?keyword=210&limitstart=0&option=com_virtuemart&view=category&virtuemart_category_id=0
As you can see, the desired product is at the very bottom of the list.


Also, I did not understand how to assign menu items to search results? To avoid such an ugly link...

 

Ghost

  • Jr. Member
  • **
  • Posts: 413
Re: Sort ordering in search results
« Reply #1 on: June 06, 2018, 08:31:25 am »
Yes, go to VM Configuration -> Product Order Settings.

d0ublezer0

  • Jr. Member
  • **
  • Posts: 158
Re: Sort ordering in search results
« Reply #2 on: June 06, 2018, 08:44:47 am »
Yes, go to VM Configuration -> Product Order Settings.
As i already said: The default sorting for products is set "ordering" in backend.
this is correct, because I can arrange the goods in the right order within the same category
Is it possible to set the sort order for the search results? Forced?

Ghost

  • Jr. Member
  • **
  • Posts: 413
Re: Sort ordering in search results
« Reply #3 on: June 06, 2018, 10:12:37 am »
Add this to the form in your search module:

Code: [Select]
<input type="hidden" name="orderby" value="product_sku"/>