Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
integration:csharp-reading-xmldatafeed-with-xmlserializer [2012/08/22 09:13] – [csharp-reading-xmldatafeed-with-xmlserializer] babble | integration:csharp-reading-xmldatafeed-with-xmlserializer [2019/10/18 03:15] (current) – [Data entry] adam | ||
---|---|---|---|
Line 1: | Line 1: | ||
---- dataentry integration ---- | ---- dataentry integration ---- | ||
- | type : integration | + | type |
- | supports-foxycart-version-from : | + | supports-foxycart-version-from : 1.0 # |
- | supports-foxycart-version-to | + | supports-foxycart-version-to |
- | systems | + | systems |
- | name : | + | name |
- | description | + | description |
- | tags_tags | + | tags : cSharp, .net, datafeed, xml # |
- | date_dt | + | date_dt |
- | version | + | version |
- | developer_url : | + | developer_url |
---- | ---- | ||
+ | |||
Line 23: | Line 24: | ||
===== Description ===== | ===== Description ===== | ||
This post outlines the most effective way of reading the FoxyCart transaction data feed in c#.net and asp.net. It is written in c#, but could apply to any .net language. | This post outlines the most effective way of reading the FoxyCart transaction data feed in c#.net and asp.net. It is written in c#, but could apply to any .net language. | ||
+ | |||
+ | The post is based on FoxyCart v1.0, but the logic works just as well for any version. However if you are using previous versions, you'll have to go through the entire article without skipping any steps. | ||
The post is based around the '' | The post is based around the '' | ||
Line 44: | Line 47: | ||
* Enter the following command, this will generated a file called FoxyData_v1.xsd: | * Enter the following command, this will generated a file called FoxyData_v1.xsd: | ||
* Open FoxyData_v1.xsd in **Notepad** | * Open FoxyData_v1.xsd in **Notepad** | ||
- | * **Find and replace** ''</ | + | * **Find and replace** ''</ |
* In the **Visual Studio 2010 command prompt** enter the following command. This will generate a file called FoxyData_v1.cs: | * In the **Visual Studio 2010 command prompt** enter the following command. This will generate a file called FoxyData_v1.cs: | ||
Line 107: | Line 110: | ||
Visual Studio 2010 (or newer). | Visual Studio 2010 (or newer). | ||
- | A Foxy Cart transaction feed XML file (v1.0). Decrypted and decoded. See other articles on how to decrypt and decode the FoxyCart transaction feed in .net. | + | A Foxy Cart transaction feed XML file (v1.0 - see description section for previous versions). Decrypted and decoded. See other articles on how to decrypt and decode the FoxyCart transaction feed in .net. |
Line 151: | Line 154: | ||
// < | // < | ||
// This code was generated by a tool. | // This code was generated by a tool. | ||
- | // | + | // |
// | // | ||
// | // | ||
Line 366: | Line 369: | ||
| | ||
private string customer_password_hash_configField; | private string customer_password_hash_configField; | ||
- | | ||
- | private string custom_fieldsField; | ||
| | ||
private string shipto_addressesField; | private string shipto_addressesField; | ||
Line 376: | Line 377: | ||
| | ||
private foxydataTransactionsTransactionDiscounts[] discountsField; | private foxydataTransactionsTransactionDiscounts[] discountsField; | ||
+ | | ||
+ | private foxydataTransactionsTransactionCustom_fields[] custom_fieldsField; | ||
| | ||
private foxydataTransactionsTransactionTransaction_details[] transaction_detailsField; | private foxydataTransactionsTransactionTransaction_details[] transaction_detailsField; | ||
Line 983: | Line 986: | ||
set { | set { | ||
this.customer_password_hash_configField = value; | this.customer_password_hash_configField = value; | ||
- | } | ||
- | } | ||
- | | ||
- | /// < | ||
- | [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] | ||
- | public string custom_fields { | ||
- | get { | ||
- | return this.custom_fieldsField; | ||
- | } | ||
- | set { | ||
- | this.custom_fieldsField = value; | ||
} | } | ||
} | } | ||
Line 1038: | Line 1030: | ||
set { | set { | ||
this.discountsField = value; | this.discountsField = value; | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | /// < | ||
+ | [System.Xml.Serialization.XmlElementAttribute(" | ||
+ | public foxydataTransactionsTransactionCustom_fields[] custom_fields { | ||
+ | get { | ||
+ | return this.custom_fieldsField; | ||
+ | } | ||
+ | set { | ||
+ | this.custom_fieldsField = value; | ||
} | } | ||
} | } | ||
Line 1232: | Line 1235: | ||
set { | set { | ||
this.coupon_discount_detailsField = value; | this.coupon_discount_detailsField = value; | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | /// < | ||
+ | [System.Xml.Serialization.XmlAttributeAttribute()] | ||
+ | public string tmp { | ||
+ | get { | ||
+ | return this.tmpField; | ||
+ | } | ||
+ | set { | ||
+ | this.tmpField = value; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | /// < | ||
+ | [System.CodeDom.Compiler.GeneratedCodeAttribute(" | ||
+ | [System.SerializableAttribute()] | ||
+ | [System.Diagnostics.DebuggerStepThroughAttribute()] | ||
+ | [System.ComponentModel.DesignerCategoryAttribute(" | ||
+ | [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] | ||
+ | public partial class foxydataTransactionsTransactionCustom_fields { | ||
+ | | ||
+ | private foxydataTransactionsTransactionCustom_fieldsCustom_field[] custom_fieldField; | ||
+ | | ||
+ | private string tmpField; | ||
+ | | ||
+ | /// < | ||
+ | [System.Xml.Serialization.XmlElementAttribute(" | ||
+ | public foxydataTransactionsTransactionCustom_fieldsCustom_field[] custom_field { | ||
+ | get { | ||
+ | return this.custom_fieldField; | ||
+ | } | ||
+ | set { | ||
+ | this.custom_fieldField = value; | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | /// < | ||
+ | [System.Xml.Serialization.XmlAttributeAttribute()] | ||
+ | public string tmp { | ||
+ | get { | ||
+ | return this.tmpField; | ||
+ | } | ||
+ | set { | ||
+ | this.tmpField = value; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | /// < | ||
+ | [System.CodeDom.Compiler.GeneratedCodeAttribute(" | ||
+ | [System.SerializableAttribute()] | ||
+ | [System.Diagnostics.DebuggerStepThroughAttribute()] | ||
+ | [System.ComponentModel.DesignerCategoryAttribute(" | ||
+ | [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] | ||
+ | public partial class foxydataTransactionsTransactionCustom_fieldsCustom_field { | ||
+ | | ||
+ | private string custom_field_nameField; | ||
+ | | ||
+ | private string custom_field_valueField; | ||
+ | | ||
+ | private string custom_field_is_hiddenField; | ||
+ | | ||
+ | private string tmpField; | ||
+ | | ||
+ | /// < | ||
+ | [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] | ||
+ | public string custom_field_name { | ||
+ | get { | ||
+ | return this.custom_field_nameField; | ||
+ | } | ||
+ | set { | ||
+ | this.custom_field_nameField = value; | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | /// < | ||
+ | [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] | ||
+ | public string custom_field_value { | ||
+ | get { | ||
+ | return this.custom_field_valueField; | ||
+ | } | ||
+ | set { | ||
+ | this.custom_field_valueField = value; | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | /// < | ||
+ | [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] | ||
+ | public string custom_field_is_hidden { | ||
+ | get { | ||
+ | return this.custom_field_is_hiddenField; | ||
+ | } | ||
+ | set { | ||
+ | this.custom_field_is_hiddenField = value; | ||
} | } | ||
} | } |