Commerce Server General - Help on getting ShippingMethods

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > July 2006 > Help on getting ShippingMethods





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 Help on getting ShippingMethods
André Nobre

2006-07-17, 1:17 pm

Commerce Server 2007
CultureInfo.CurrentCulture.Name is "en-US"

I´m trying to obtain shipping methods in a table using two codes:

CommerceContext.Current.OrderSystem.GetShippingMethods()
this.shippingMethods.Tables[CultureInfo.CurrentCulture.Name];

and

CommerceContext.Current.OrderSystem.GetShippingMethods(CultureInfo.CurrentCulture.Name).Tables[0];

I have only shipping methods for "pt-BR" culture, but the culture name of my
server is en-US. So, in my understanding, no shipping methods would be
returned with the codes above (I´m sure that CultureInfo.CurrentCulture.Name
returns en-US). My problem is this... The second piece of code returns all
shipping methods, that are only for pt-BR. Anyone can explain that for me?

Thanks!

André


Nihit Kaul [MSFT]

2006-07-18, 7:22 am

Instead of just answering it here, I have explained the behavior in this blog post. Hope that helps explain the different results that you are seeing:

http://blogs.msdn.com/nihitk/archiv...ingMethods.aspx

Also - will try and get the online docs updated to mention this as well and call the behavior out explicitly.

Thanks,

Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
--------------------
From: "André Nobre" <andrevnobre@gmail.com>
Subject: Help on getting ShippingMethods
Date: Mon, 17 Jul 2006 09:48:26 -0300
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
X-RFC2646: Format=Flowed; Original
Message-ID: <eFIDN9ZqGHA.4492@TK2MSFTNGP05.phx.gbl>
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: 200-157-88-253.brq.com 200.157.88.253
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP05.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:18027
X-Tomcat-NG: microsoft.public.commerceserver.general

Commerce Server 2007
CultureInfo.CurrentCulture.Name is "en-US"

I´m trying to obtain shipping methods in a table using two codes:

CommerceContext.Current.OrderSystem.GetShippingMethods()
this.shippingMethods.Tables[CultureInfo.CurrentCulture.Name];

and

CommerceContext.Current.OrderSystem.GetShippingMethods(CultureInfo.CurrentCulture.Name).Tables[0];

I have only shipping methods for "pt-BR" culture, but the culture name of my
server is en-US. So, in my understanding, no shipping methods would be
returned with the codes above (I´m sure that CultureInfo.CurrentCulture.Name
returns en-US). My problem is this... The second piece of code returns all
shipping methods, that are only for pt-BR. Anyone can explain that for me?

Thanks!

André




André Nobre

2006-07-18, 1:24 pm

Thanks Nihit, I noted that with somes tests, but It´s good to comprove it.

"Nihit Kaul [MSFT]" <nihitk@online.microsoft.com> wrote in message
news:n%23YoYZfqGHA.4612@TK2MSFTNGXA01.phx.gbl...
> Instead of just answering it here, I have explained the behavior in this
> blog post. Hope that helps explain the different results that you are
> seeing:
>
> http://blogs.msdn.com/nihitk/archiv...ingMethods.aspx
>
> Also - will try and get the online docs updated to mention this as well
> and call the behavior out explicitly.
>
> Thanks,
>
> Nihit Kaul[MSFT]
> Commerce Server
> http://blogs.msdn.com/nihitk
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --------------------
> From: "André Nobre" <andrevnobre@gmail.com>
> Subject: Help on getting ShippingMethods
> Date: Mon, 17 Jul 2006 09:48:26 -0300
> Lines: 23
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
> X-RFC2646: Format=Flowed; Original
> Message-ID: <eFIDN9ZqGHA.4492@TK2MSFTNGP05.phx.gbl>
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: 200-157-88-253.brq.com 200.157.88.253
> Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP05.phx.gbl
> Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:18027
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Commerce Server 2007
> CultureInfo.CurrentCulture.Name is "en-US"
>
> I´m trying to obtain shipping methods in a table using two codes:
>
> CommerceContext.Current.OrderSystem.GetShippingMethods()
> this.shippingMethods.Tables[CultureInfo.CurrentCulture.Name];
>
> and
>
> CommerceContext.Current.OrderSystem.GetShippingMethods(CultureInfo.CurrentCulture.Name).Tables[0];
>
> I have only shipping methods for "pt-BR" culture, but the culture name of
> my
> server is en-US. So, in my understanding, no shipping methods would be
> returned with the codes above (I´m sure that
> CultureInfo.CurrentCulture.Name
> returns en-US). My problem is this... The second piece of code returns all
> shipping methods, that are only for pt-BR. Anyone can explain that for me?
>
> Thanks!
>
> André
>
>
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com