Hi all, I'm wondering if there can be more search options than the currently available defaults? (i.e., position, Name, price,created on)
I'd like to be able to add other search options such as Product Date (as opposed to date created), product location (i.e., Products from Boston, New York, etc).
Is this something that can be easily done or is this quite complex?
Forgot to mention I am using V3.40
Hi, you need to customize code for this.
1. Add Your new values to ProductSortingEnum.cs here(/Libraries/Nop.Core/Domain/Catalog/ProductSortingEnum.cs)
2. Modify ProductLoadAllPaged store procedure according to your sorting requirements.
3. Add language resources for your enum values for display purpose in dropdowns.
Hope this helps.
By default sorting options are Name,Price,CreatedOnUtc and DisplayOrder. If you want to add more options to sort, you need to change source code.If you see "ProductLoadAllPaged" Stored procedure you will get a idea.So far I understand to add more sorting option you need to change the stored procedure and related sorting code as well.