Commerce Server General - Get Custom Property

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > October 2005 > Get Custom Property





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 Get Custom Property
cgruber

2005-09-30, 8:47 pm

HI all,

For our integration with another system, we need to write a record
with various information about our order. I'm doing this is
TransactionContext.cs. I have all the fields I need except for one,
it is a custom property for a product named 'Program Number'. Here
is the code for pulling everything I need:

UserObject user = UserObject.CurrentUser;

string billAddressLineOne = this.BillingAddress.Line1;
string billCity = this.BillingAddress.City;
string billState = this.BillingAddress.State;
string billZip = this.BillingAddress.PostalCode;
string billCountry = this.BillingAddress.Country;
string billFirstName = this.BillingAddress.FirstName;
string billLastName = this.BillingAddress.LastName;
string ccExpire =
this.fieldOrderForm[OrderFormFields.CreditCardMonth].ToString()
+
this.fieldOrderForm[OrderFormFields.CreditCardYear].ToString();
string ccNum =
this.fieldOrderForm[OrderFormFields.CreditCardNumber].ToString();
string ccType =
this.fieldOrderForm[OrderFormFields.CreditCardName].ToString();
string dateOrdered = DateTime.Now.ToString();
string email = user.EmailAddress;
string orderFulfilled = "false";
string phone =
user[MyAccount.UserProfilePropertyTelephoneNumber].ToString();

//PROBLEM:string programNumber = ????

string shipAddressLineOne = this.ShippingAddress.Line1;
string shipAmount = this.ShippingTotal.ToString();
string shipCity = this.ShippingAddress.City;
string shipCommercial = "false";
string shipCountry = this.ShippingAddress.Country;
string shipFirstName = this.ShippingAddress.FirstName;
string shipLastName = this.ShippingAddress.LastName;
string shipState = this.ShippingAddress.State;
string shipType =
this.fieldFirstShippingMethodName.ToString();
string shipZip =
this.ShippingAddress.PostalCode;

How would I go about pulling this field? I know I will have to break
apart the shipment into lineitems, but where do I go after I get that
lineitem out?

Thanks for any help you can give me!
Chris

cgruber

2005-10-03, 6:02 pm

I've found some stuff here:
http://blogs.msdn.com/vinayakt/archive/2004/06.aspx

Still trying to work it out.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com