dv8dug wrote:I've searched the forums to no avail. I'm sure someone has asked this question before too...
I go to Admin/Catalog/Products/Manage Products and it lists the stores inventory. Is there a way to have the products list by SKU instead of product name? It would save me ALOT of time managing my store.
Hi,
Yes we can change default listing on Admin -> Manage Products.
Product listing is coming with help on stored procedure in NopCommerce Database.
Default sorting is not by name but default sorting is by Paging (Display Order)
Go to NopCommerce Database in Sql Server -> Stored Procedure
Modify Stored Procedure :
ProductLoadAllPagedBefore Change :
--sorting
SET @sql_orderby = ''
IF @OrderBy = 5 /* Name: A to Z */
SET @sql_orderby = ' p.[Name] ASC'
ELSE IF @OrderBy = 6 /* Name: Z to A */
SET @sql_orderby = ' p.[Name] DESC'
ELSE IF @OrderBy = 10 /* Price: Low to High */
SET @sql_orderby = ' p.[Price] ASC'
ELSE IF @OrderBy = 11 /* Price: High to Low */
SET @sql_orderby = ' p.[Price] DESC'
ELSE IF @OrderBy = 15 /* creation date */
SET @sql_orderby = ' p.[CreatedOnUtc] DESC'
ELSE /* default sorting, 0 (position) */
After Change It will be like :
--sorting
SET @sql_orderby = ''
IF @OrderBy = 5 /* Name: A to Z */
SET @sql_orderby = ' p.[Name] ASC'
ELSE IF @OrderBy = 6 /* Name: Z to A */
SET @sql_orderby = ' p.[Name] DESC'
ELSE IF @OrderBy = 10 /* Price: Low to High */
SET @sql_orderby = ' p.[Price] ASC'
ELSE IF @OrderBy = 11 /* Price: High to Low */
SET @sql_orderby = ' p.[Price] DESC'
ELSE IF @OrderBy = 15 /* creation date */
SET @sql_orderby = ' p.[CreatedOnUtc] DESC'
ELSE /* default sorting, 0 (position) */
SET @sql_orderby = ' p.[Sku] DESC'
Change sorting to
SET @sql_orderby = ' p.[Sku] DESC' OR SET @sql_orderby = ' p.[Sku] ASC'as per your requirement.
I hope this will help you in getting listing order by sku on product listing page in admin panel.
Please Note that,
This will also affect on listing on other pages on site.Hope this helps you.