Commerce Server General - DisplayName For categories

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > September 2004 > DisplayName For categories





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author DisplayName For categories
Talkbiz

2004-09-22, 9:47 pm

Hi,

Can you please tell me how I can get the “DisplayName” for the categories ?
For example, I have a category called “Color”. If the DisplayName is in
French (Fr-FR) I must get “Couleur” or if the DisplayName is in English
(en-US), I must have “Color”. And I want to get this using c#.

Thanks,
Talkbiz

Ragini Singh [MSFT]

2004-09-22, 9:47 pm

Please let us know the version of Commerce Server you are working with.

Thanks.

This posting is provided "AS IS" with no warranties, and confers no rights.

EBusiness Server Team
--------------------
Thread-Topic: DisplayName For categories
thread-index: AcScnPXkHX+axzunSlebDP/CJHPD4Q==
X-WBNR-Posting-Host: 81.255.177.89
From: "=?Utf-8?B?VGFsa2Jpeg==?=" <Talkbiz@discussions.microsoft.com>
Subject: DisplayName For categories
Date: Fri, 17 Sep 2004 02:59:02 -0700
Lines: 10
Message-ID: <25C25662-EA3C-4DB1-8F6A-BC1C8A525674@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14786
X-Tomcat-NG: microsoft.public.commerceserver.general

Hi,

Can you please tell me how I can get the “DisplayName” for the
categories ?
For example, I have a category called “Color”. If the DisplayName is in
French (Fr-FR) I must get “Couleur” or if the DisplayName is in English
(en-US), I must have “Color”. And I want to get this using c#.

Thanks,
Talkbiz



This posting is provided "AS IS" with no warranties, and confers no rights.

EBusiness Server Team
Talkbiz

2004-09-22, 9:47 pm

I use commerce server 2002 is I develop in ASP.NET
¶Thank you ¶

"Ragini Singh [MSFT]" wrote:

> Please let us know the version of Commerce Server you are working with.
>
> Thanks.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> EBusiness Server Team
> --------------------
> Thread-Topic: DisplayName For categories
> thread-index: AcScnPXkHX+axzunSlebDP/CJHPD4Q==
> X-WBNR-Posting-Host: 81.255.177.89
> From: "=?Utf-8?B?VGFsa2Jpeg==?=" <Talkbiz@discussions.microsoft.com>
> Subject: DisplayName For categories
> Date: Fri, 17 Sep 2004 02:59:02 -0700
> Lines: 10
> Message-ID: <25C25662-EA3C-4DB1-8F6A-BC1C8A525674@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 8bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14786
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Hi,
>
> Can you please tell me how I can get the “DisplayName” for the
> categories ?
> For example, I have a category called “Color”. If the DisplayName is in
> French (Fr-FR) I must get “Couleur” or if the DisplayName is in English
> (en-US), I must have “Color”. And I want to get this using c#.
>
> Thanks,
> Talkbiz
>
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> EBusiness Server Team

Vinayak Tadas[MSFT]

2004-09-22, 9:47 pm

Add a reference to Microsoft.CommerceServer.Runtime.dll

public string GetCategoryDisplayName(string catalogName, string
categoryName, string language)
{
ProductCatalog productCatalog =
CommerceContext.Current.CatalogSystem.GetCatalog(catalogName);
productCatalog.ActiveLanguage = language;
Category category = productCatalog.GetCategory(categoryName);
DataSet ds = category.GetCategoryProperties();

return ds.Tables[0].Rows[0]["DisplayName"];



}
--------------------
Thread-Topic: DisplayName For categories
thread-index: AcSe5t0LQx/S4tYfSr+kkCh0GEAS9w==
X-WBNR-Posting-Host: 81.255.177.89
From: "=?Utf-8?B?VGFsa2Jpeg==?=" <Talkbiz@discussions.microsoft.com>
References: <25C25662-EA3C-4DB1-8F6A-BC1C8A525674@microsoft.com>
<WV5ManNnEHA.2932@cpmsftngxa06.phx.gbl>
Subject: RE: DisplayName For categories
Date: Mon, 20 Sep 2004 00:53:06 -0700
Lines: 52
Message-ID: <BD7C0A8B-F29A-4C1B-8FC6-AD16625D762D@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14795
X-Tomcat-NG: microsoft.public.commerceserver.general

I use commerce server 2002 is I develop in ASP.NET
¶Thank you ¶

"Ragini Singh [MSFT]" wrote:

> Please let us know the version of Commerce Server you are working with.
>
> Thanks.
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>
> EBusiness Server Team
> --------------------
> Thread-Topic: DisplayName For categories
> thread-index: AcScnPXkHX+axzunSlebDP/CJHPD4Q==
> X-WBNR-Posting-Host: 81.255.177.89
> From: "=?Utf-8?B?VGFsa2Jpeg==?=" <Talkbiz@discussions.microsoft.com>
> Subject: DisplayName For categories
> Date: Fri, 17 Sep 2004 02:59:02 -0700
> Lines: 10
> Message-ID: <25C25662-EA3C-4DB1-8F6A-BC1C8A525674@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 8bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14786
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Hi,
>
> Can you please tell me how I can get the â€"DisplayName” for

the
> categories ?
> For example, I have a category called â€"Color”. If the

DisplayName is in
> French (Fr-FR) I must get â€"Couleur” or if the DisplayName is

in English
> (en-US), I must have â€"Color”. And I want to get this using c#.
>
> Thanks,
> Talkbiz
>
>
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>
> EBusiness Server Team



Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only. Thanks

Talkbiz

2004-09-22, 9:47 pm

Thank you for your answer
I would like to make the same thing with Property When I recover
informations from productCatalog.PropertyNames I get the name and I want to
have DisplayName.
Any idea?


""Vinayak Tadas[MSFT]"" wrote:

> Add a reference to Microsoft.CommerceServer.Runtime.dll
>
> public string GetCategoryDisplayName(string catalogName, string
> categoryName, string language)
> {
> ProductCatalog productCatalog =
> CommerceContext.Current.CatalogSystem.GetCatalog(catalogName);
> productCatalog.ActiveLanguage = language;
> Category category = productCatalog.GetCategory(categoryName);
> DataSet ds = category.GetCategoryProperties();
>
> return ds.Tables[0].Rows[0]["DisplayName"];
>
>
>
> }
> --------------------
> Thread-Topic: DisplayName For categories
> thread-index: AcSe5t0LQx/S4tYfSr+kkCh0GEAS9w==
> X-WBNR-Posting-Host: 81.255.177.89
> From: "=?Utf-8?B?VGFsa2Jpeg==?=" <Talkbiz@discussions.microsoft.com>
> References: <25C25662-EA3C-4DB1-8F6A-BC1C8A525674@microsoft.com>
> <WV5ManNnEHA.2932@cpmsftngxa06.phx.gbl>
> Subject: RE: DisplayName For categories
> Date: Mon, 20 Sep 2004 00:53:06 -0700
> Lines: 52
> Message-ID: <BD7C0A8B-F29A-4C1B-8FC6-AD16625D762D@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 8bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14795
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> I use commerce server 2002 is I develop in ASP.NET
> ¶Thank you ¶
>
> "Ragini Singh [MSFT]" wrote:
>
> rights.
> the
> DisplayName is in
> in English
> rights.
>
>
> Thanks
> Vinayak Tadas
> Microsoft
> http://blogs.msdn.com/vinayakt
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2002 Microsoft Corporation. All rights
> reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Get Secure! For more info visit http://www.microsoft.com/security. Please
> reply to the newsgroups only

Vinayak Tadas[MSFT]

2004-09-22, 9:47 pm

You can do something like

private string GetPropertyDisplayName(string propertyName, string
languageName)
{
CatalogContext catalogContext =
CommerceContext.Current.CatalogSystem;
DataSet ds = catalogContext.GetPropertyAttributes(propertyName);

// The language specific display name for the property will be
stored in the DisplayName_<languagename>
string displayNameColumn = string.Format("DisplayName_{0}",
languageName);
string displayName;
// First check if this column exists. If not then use the
Displayname column to get th display name
if (ds.Tables[0].Columns.Contains(displayNameColumn) == false)
{
displayNameColumn = "DisplayName";
}
return ds.Tables[0].Rows[0][displayNameColumn];
}



--------------------
Thread-Topic: DisplayName For categories
thread-index: AcSfuYYMwNkcHN/2SVKYKLZnavC05A==
X-WBNR-Posting-Host: 81.255.177.89
From: "=?Utf-8?B?VGFsa2Jpeg==?=" <Talkbiz@discussions.microsoft.com>
References: <25C25662-EA3C-4DB1-8F6A-BC1C8A525674@microsoft.com>
<WV5ManNnEHA.2932@cpmsftngxa06.phx.gbl>
<BD7C0A8B-F29A-4C1B-8FC6-AD16625D762D@microsoft.com>
<kfeDp80nEHA.2932@cpmsftngxa06.phx.gbl>
Subject: RE: DisplayName For categories
Date: Tue, 21 Sep 2004 02:01:04 -0700
Lines: 122
Message-ID: <AA6A81E5-72E5-4B4A-8873-970007B7183A@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14807
X-Tomcat-NG: microsoft.public.commerceserver.general

Thank you for your answer
I would like to make the same thing with Property When I recover
informations from productCatalog.PropertyNames I get the name and I want to
have DisplayName.
Any idea?


""Vinayak Tadas[MSFT]"" wrote:

> Add a reference to Microsoft.CommerceServer.Runtime.dll
>
> public string GetCategoryDisplayName(string catalogName, string
> categoryName, string language)
> {
> ProductCatalog productCatalog =
> CommerceContext.Current.CatalogSystem.GetCatalog(catalogName);
> productCatalog.ActiveLanguage = language;
> Category category = productCatalog.GetCategory(categoryName);
> DataSet ds = category.GetCategoryProperties();
>
> return ds.Tables[0].Rows[0]["DisplayName"];
>
>
>
> }
> --------------------
> Thread-Topic: DisplayName For categories
> thread-index: AcSe5t0LQx/S4tYfSr+kkCh0GEAS9w==
> X-WBNR-Posting-Host: 81.255.177.89
> From: "=?Utf-8?B?VGFsa2Jpeg==?=" <Talkbiz@discussions.microsoft.com>
> References: <25C25662-EA3C-4DB1-8F6A-BC1C8A525674@microsoft.com>
> <WV5ManNnEHA.2932@cpmsftngxa06.phx.gbl>
> Subject: RE: DisplayName For categories
> Date: Mon, 20 Sep 2004 00:53:06 -0700
> Lines: 52
> Message-ID: <BD7C0A8B-F29A-4C1B-8FC6-AD16625D762D@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 8bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14795
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> I use commerce server 2002 is I develop in ASP.NET
> ¶Thank you ¶
>
> "Ragini Singh [MSFT]" wrote:
>
> rights.
â€Å"DisplayName” for[vbcol=seagreen]
> the
â€Å"Color”. If the[vbcol=seagreen]
> DisplayName is in
the DisplayName is[vbcol=seagreen]
> in English
get this using c#.[vbcol=seagreen]
> rights.
>
>
> Thanks
> Vinayak Tadas
> Microsoft
> http://blogs.msdn.com/vinayakt
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
> You assume all risk for your use. © 2002 Microsoft Corporation. All

rights
> reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Get Secure! For more info visit http://www.microsoft.com/security.

Please
> reply to the newsgroups only



Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only. Thanks

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com