News:

Looking for documentation? Take a look on our wiki

Main Menu

Sort ordering in search results

Started by d0ublezer0, June 06, 2018, 08:16:30 AM

Previous topic - Next topic

d0ublezer0

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

Yes, go to VM Configuration -> Product Order Settings.

d0ublezer0

Quote from: Ghost on June 06, 2018, 08:31:25 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

Add this to the form in your search module:

<input type="hidden" name="orderby" value="product_sku"/>