the order of items

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 anni tempo fa
i have not been able to figure out a way to put the items in my store in alphabeticial order I have tried to change the display order from 1 being A and up put that did not change it.  How can I make this happen?
14 anni tempo fa
Hi,

What you could do is set the display order property of each product to 1(A), 2(B), 3(C)

follow this in admin panel Catalog / Categories / selected category / Products Tab.

Or you could edit the stored proc to select in asce order, but this takes a little reworking. This is how I do it.

Hope this helps you.

mike..
14 anni tempo fa
Which stored procedures would need to be modified to accomplish this?

Thank You!
14 anni tempo fa
EXCELLENT! This is exactly what I was looking for. I have been struggling with this for a while, and Mikes steps work perfectly for my situation. Thanks Mike!
14 anni tempo fa
which steps did you use?

the product order 1(A)


or did you create a new stored procedure?
14 anni tempo fa
It would be very helpful if you could name the relevant stored procedure & copy the code. Thank You.
14 anni tempo fa
+1 on this. I would like the name of the Stored Proc as well.
14 anni tempo fa
Here's what I did, and it seems like it's working.

Stored Procedure Name: Nop_ProductLoadAllPaged

Changes:
Original lines are commented out, new lines are in bold.


  --display order
  CREATE TABLE #DisplayOrder
  (
    ProductID int not null PRIMARY KEY,
    DisplayOrder int not null
  )  

  IF @CategoryID IS NOT NULL AND @CategoryID > 0
    BEGIN
      INSERT #DisplayOrder
      SELECT p.ProductID, row_number() OVER (ORDER BY p.Name)
      FROM [Nop_Product_Category_Mapping] pcm
      INNER JOIN [Nop_Product] p ON pcm.ProductID = p.ProductID
      WHERE pcm.CategoryID = @CategoryID

      --SELECT pcm.ProductID, pcm.DisplayOrder
      --FROM [Nop_Product_Category_Mapping] pcm WHERE pcm.CategoryID = @CategoryID
    END
    ELSE IF @ManufacturerID IS NOT NULL AND @ManufacturerID > 0
    BEGIN
      INSERT #DisplayOrder
      SELECT pmm.ProductID, row_number() OVER (ORDER BY p.Name)
      FROM [Nop_Product_Manufacturer_Mapping] pmm
      INNER JOIN [Nop_Product] p ON pmm.ProductID = p.ProductID
      WHERE pmm.ManufacturerID = @ManufacturerID

      --SELECT pmm.ProductID, pmm.Displayorder
      --FROM [Nop_Product_Manufacturer_Mapping] pmm WHERE pmm.ManufacturerID = @ManufacturerID
    END
  ELSE
    BEGIN
      INSERT #DisplayOrder
      SELECT p.ProductID, row_number() OVER (ORDER BY p.[Name])
      --SELECT p.ProductID, 1
      FROM [Nop_Product] p
      --ORDER BY p.[Name]
    END
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.