a.m. wrote:Short step list:
1. You should extend 'Product' entity with two new properties: 'NumberOfSales' and 'NumberOfViews'.
2. Increment them in appropriate cases (when new order is placed and a product details page is viewed)
2. Add these new options to ProductSortingEnum (\src\Libraries\Nop.Core\Domain\Catalog\ProductSortingEnum.cs)
3. Update appropriate methods and stored procedure in order to use these new option (\src\Libraries\Nop.Services\Catalog\ProductService.cs - 'SearchProducts' method and [ProductLoadAllPaged] stored procedure)
I have performed these same steps but not working.
---
I have customized code for the add Custom sorting on Product list or seatch. I have added new field in Database LifetimeSalesAmount DECIMAL.
I have done following changes.
1) Added new property to Product entity
2) Increment them in appropriate cases (when new order is placed)
3) Add these new options to ProductSortingEnum (\src\Libraries\Nop.Core\Domain\Catalog\ProductSortingEnum.cs)
4) Update appropriate methods and stored procedure in order to use these new option (\src\Libraries\Nop.Services\Catalog\ProductService.cs - 'SearchProducts' method and [ProductLoadAllPaged] stored procedure)
Now, New Option is displayed at UI side but after selecting that option products are sorted on default (position) option, but not on my custom option.
Can any suggest? What's Wrong?
---