DisplayName For categories
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > DisplayName For categories




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    DisplayName For categories  
Talkbiz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

Hi,

Can you please tell me how I can get the “DisplayName” for the categorie
s ?
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






[ Post a follow-up to this message ]



    RE: DisplayName For categories  
Ragini Singh [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

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: "examnotes" <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





[ Post a follow-up to this message ]



    RE: DisplayName For categories  
Talkbiz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

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: "examnotes" <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 th
e
> categories ?
> For example, I have a category called “Color”. If the DisplayN
ame is in
> French (Fr-FR) I must get “Couleur” or if the DisplayName is i
n 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





[ Post a follow-up to this message ]



    RE: DisplayName For categories  
Vinayak Tadas[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

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: "examnotes" <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: "examnotes" <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






[ Post a follow-up to this message ]



    RE: DisplayName For categories  
Talkbiz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

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: "examnotes" <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 right
s
> 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.  Pleas
e
> reply to the newsgroups only





[ Post a follow-up to this message ]



    RE: DisplayName For categories  
Vinayak Tadas[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

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: "examnotes" <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: "examnotes" <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






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:48 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register