Hi
I want to order the products in one category by a custom field is that posible??
For example i want to order books whith a custom field that is the year of the book release
You need a filtering extension.
Look here: http://breakdesigns.net/extensions/custom-filters
with custom filters can I sort products with a custom field????
oh sorry i thought you wanted to filter products by custom field.
To sort them by custom field i think that you should change the sql query in the category pages.
You can find it at the file: administrator\components\com_virtuemart\models\product.php
The function is the sortSearchListQuery
I would be obliged if you give me a little more information, because I could not understand how to do what im ask.
Thank you
any idea ?
It needs some sql knowledge.
You should join the query with the product_customfields table of the database and then change the order by to 1 of the fields of this table
I have to make changes in this file only, administrator\components\com_virtuemart\models\product.php ?
If you want to have your products to be sorted only by a custom field yes this file is enough.
If you want to have other sorting options too, you should add the sort by custom field option also to the drop-down list that regrads the sorting
i want i can choose sort by custom field in sort by page of settings of virtuemart but don't lost the other options of sort by. it is posible?