Order Notes
-
- Ensign (ENS)
- Posts: 13
- Joined: Wed May 27, 2009 4:17 pm
Order Notes
If I want to only pull out comments entered by the Customer, then how can I do this? What does the ac_OrderNotes..NoteTypeId column represent? It seems as though customer comments have NoteTypeId=0 versus private system comments which have NoteTypeId=3. What does the 1 & 3 represent?
Re: Order Notes
You can access all this information via commerce builder API code. For example have a look at following code
Where for orderId you will provide the actual id of order for which you want to view order notes.
Code: Select all
OrderNoteCollection notes = OrderNoteDataSource.LoadForOrder(orderId);
foreach (OrderNote note in notes)
{
switch(note.NoteType)
{
case NoteType.Private:
break;
case NoteType.Public:
break;
case NoteType.SystemPrivate:
break;
case NoteType.SystemPublic:
break;
}
}
-
- Ensign (ENS)
- Posts: 13
- Joined: Wed May 27, 2009 4:17 pm
Re: Order Notes
Thank you.
But I'm writing code to pull data directly from the database & I was trying to find documentation that assures me what NoteTypeId & OrderItemTypeID represent. Does documentation exist somewhere that states
ac_OrderNotes..NoteTypeId
value = 0 is Public
value = 1 is private
etc.
ac_OrderItems.OrderItemTypeId
value = 0, Product
value = 3, Tax
value = 1, Shipping
etc.
But I'm writing code to pull data directly from the database & I was trying to find documentation that assures me what NoteTypeId & OrderItemTypeID represent. Does documentation exist somewhere that states
ac_OrderNotes..NoteTypeId
value = 0 is Public
value = 1 is private
etc.
ac_OrderItems.OrderItemTypeId
value = 0, Product
value = 3, Tax
value = 1, Shipping
etc.
Re: Order Notes
Here is the note type enum values list with their friendly names
Code: Select all
Public = 0
Private = 1
SystemPublic = 2
SystemPrivate = 3
-
- Ensign (ENS)
- Posts: 13
- Joined: Wed May 27, 2009 4:17 pm
Re: Order Notes
Great. Thank you.
Where is this information found?
Do you have same for ac_OrderItems.OrderItemTypeId?
Where is this information found?
Do you have same for ac_OrderItems.OrderItemTypeId?
Re: Order Notes
I simply ran following ASP.NET script to find this
Code: Select all
Response.Write("Private = " + ((Int16)NoteType.Private).ToString());
Response.Write("<br />");
Response.Write("Public = " + ((Int16)NoteType.Public).ToString());
Response.Write("<br />");
Response.Write("SystemPrivate = " + ((Int16)NoteType.SystemPrivate).ToString());
Response.Write("<br />");
Response.Write("SystemPublic = " + ((Int16)NoteType.SystemPublic).ToString());
Response.Write("<br />");