Changing default country messed up the order

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Hi nopCommerce,

I tried changing the display order of Singapore to 1 or 0 and the rest to 2, the whole list was messed up.

The list became:
Singapore
Slovakia
Slovenia
South Africa
Spain
Sweden
Switzerland
Taiwan
Thailand
Turkey
...
...
...
United States
Canada
Argentina
...
...

Is there any way to reorder the list into alphabetical order with Singapore at the 1st position followed by Argentina also so on?
14 years ago
Hi,

Run this query on your database and this should sort you problem please remember to clear cache..


USE [NopCommerce]
GO
/****** Object:  StoredProcedure [dbo].[Nop_CountryLoadAll]    Script Date: 08/22/2009 20:50:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_CountryLoadAll]
  @ShowHidden bit = 0
AS
BEGIN
  SELECT *
  FROM [Nop_Country]
  WHERE (Published = 1 or @ShowHidden = 1)
  ORDER BY DisplayOrder, Name
END

GO

ALTER PROCEDURE [dbo].[Nop_CountryLoadAllForRegistration]
  @ShowHidden bit = 0
AS
BEGIN
  SELECT *
  FROM [Nop_Country]
  WHERE (Published = 1 or @ShowHidden = 1) and AllowsRegistration=1
  ORDER BY DisplayOrder, Name
END

GO

ALTER PROCEDURE [dbo].[Nop_CountryLoadAllForBilling]
  @ShowHidden bit = 0
AS
BEGIN
  SELECT *
  FROM [Nop_Country]
  WHERE (Published = 1 or @ShowHidden = 1) and AllowsBilling=1
  ORDER BY DisplayOrder, Name
END

GO

ALTER PROCEDURE [dbo].[Nop_CountryLoadAllForShipping]
  @ShowHidden bit = 0
AS
BEGIN
  SELECT *
  FROM [Nop_Country]
  WHERE (Published = 1 or @ShowHidden = 1) and AllowsShipping=1
  ORDER BY DisplayOrder, Name
END



Let me know if you need further assitance and if this works.

mike..
14 years ago
Flawless.

Thanks mike, that is wonderful!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.