E-junkie Ecommerce Forums » E-junkie Discussions
Tag Cloud for this topic: | |
| |
|
adambeazley member Posts: 12 |
I was just looking at a different ecart company and they use a data feed (XML) something liek this: <?xml version='1.0' standalone='yes'?> <foxydata> <datafeed_version>XML FoxyCart Version 0.6</datafeed_version> <transactions> <transaction> <id>616</id> <transaction_date>2007-05-04 20:53:57</transaction_date> <customer_id>122</customer_id> <customer_first_name>John</customer_first_name> <customer_last_name>Doe</customer_last_name> <customer_address1>12345 Any Street</customer_address1> <customer_address2></customer_address2> <customer_city>Any City</customer_city> <customer_state>TN</customer_state> <customer_postal_code>37013</customer_postal_code> <customer_country>US</customer_country> <customer_phone>(123) 456-7890</customer_phone> <customer_email>someone@somewhere.com</customer_email> <customer_ip>71.228.237.177</customer_ip> <shipping_first_name>John</shipping_first_name> <shipping_last_name>Doe</shipping_last_name> <shipping_address1>1234 Any Street</shipping_address1> <shipping_address2></shipping_address2> <shipping_city>Some City</shipping_city> <shipping_state>TN</shipping_state> <shipping_postal_code>37013</shipping_postal_code> <shipping_country>US</shipping_country> <shipping_phone></shipping_phone> <shipping_service_description>UPS: Ground</shipping_service_description> <purchase_order></purchase_order> <product_total>20.00</product_total> <tax_total>0.00</tax_total> <shipping_total>4.38</shipping_total> <order_total>24.38</order_total> <order_total>24.38</order_total> <customer_password>1aab23051b24582c5dc8e23fc595d505</ customer_password> <custom_fields> <custom_field> <custom_field_name>My_Cool_Text</custom_field_name> <custom_field_value>Value123</custom_field_value> </custom_field> <custom_field> <custom_field_name>Another_Custom_Field</custom_field_name> <custom_field_value>10</custom_field_value> </custom_field> </custom_fields> <transaction_details> <transaction_detail> <product_name>foo</product_name> <product_price>20.00</product_price> <product_quantity>1</product_quantity> <product_weight>0.10</product_weight> <product_code></product_code> <subscription_frequency>1m</subscription_frequency> <subscription_startdate>2007-07-07</subscription_startdate> <next_transaction_date>2007-08-07</next_transaction_date> <shipto>John Doe</shipto> <category_description>Default for all products</category_description> <category_code>DEFAULT</category_code> <product_delivery_type>shipped</product_delivery_type> <transaction_detail_options> <transaction_detail_option> <product_option_name>color</product_option_name> <product_option_value>blue</product_option_value> <price_mod></price_mod> <weight_mod></weight_mod> </transaction_detail_option> </transaction_detail_options> </transaction_detail> </transaction_details> <shipto_addresses> <shipto_address> <address_name>John Doe</address_name> <shipto_first_name>John</shipto_first_name> <shipto_last_name>Doe</shipto_last_name> <shipto_address1>2345 Some Address</shipto_address1> <shipto_address2></shipto_address2> <shipto_city>Some City</shipto_city> <shipto_state>TN</shipto_state> <shipto_postal_code>37013</shipto_postal_code> <shipto_country>US</shipto_country> <shipto_shipping_service_description>DHL: Next Afternoon</shipto_shipping_service_description> <shipto_subtotal>52.15</shipto_subtotal> <shipto_tax_total>6.31</shipto_tax_total> <shipto_shipping_total>15.76</shipto_shipping_total> <shipto_total>74.22</shipto_total> <shipto_custom_fields> <shipto_custom_field> <shipto_custom_field_name>My_Custom_Info</shipto_custom_field_name> <shipto_custom_field_value>john's stuff</shipto_custom_field_value> </shipto_custom_field> <shipto_custom_field> <shipto_custom_field_name>More_Custom_Info</shipto_custom_field_name> <shipto_custom_field_value>more of john's stuff</shipto_custom_field_value> </shipto_custom_field> </shipto_custom_fields> </shipto_address> </shipto_addresses> </transaction> </transactions> </foxydata> Is this something you guys could implement? Its very useful as I use a CMS and I could used that data feed to keep track of all of my orders in my CMS instead of having to dig through emails. Thanks for considering. ADam # POSTED ON: September 26, 2008 @ 23:00 GMT -7 |
|
E-junkieChef E-Junkie Crew Posts: 936 |
Adam, we are coming us with another integration end-point where all the data for a transaction (not just one item) can be sent to a script. You can then write a script to the the POST data and format it into the XML structure you need. # POSTED ON: September 27, 2008 @ 12:17 GMT -7 |
|
CRM member Posts: 7 |
Hi Further to your last post, does that mean we could integrate with a fulfillment operation such as Kunaki? Please see this page to check their requirements: http://kunaki.com/XMLService.htm Thanks Mark # POSTED ON: October 7, 2008 @ 15:23 GMT -7 |
|
E-junkieChef E-Junkie Crew Posts: 936 |
You can do that already using our integration feature. We use that feature to provide integration with SwiftCD. # POSTED ON: October 8, 2008 @ 02:34 GMT -7 |
|
adambeazley member Posts: 12 |
E-junkieChefAdam, we are coming us with another integration end-point where all the data for a transaction (not just one item) can be sent to a script. E-junkieChefYou can do that already using our integration feature. We use that feature to provide integration with SwiftCD. Hey E-JunkieChef, Where can i find more information about writing some code to interact with this "end-point"? Basically I have a CMS (ExpressionEngine), that I use for my content as well as my ecommerce store. There is a plugin for EE, but it only works with one of your competitors at the moment, and i would like to tweek the code in this plugin so it will work with my e-junkie account. However, in order to do this I need someplace to go where i can learn how e-junkie info is output and formatted and what things you are planning to do in the future, so i can better make a plan for this. Thanks, Adam # POSTED ON: November 10, 2008 @ 12:08 GMT -7 |
|
E-junkieGuru E-Junkie Crew Posts: 3734 |
We have recently gone live with an enhancement that allows you to specify a Common Notification URL (in Seller Admin > Edit Account Preferences) where we would POST all order data for any/all products ordered. This data would be sent as name-value pairs, using the field names documented here: http://www.e-junkie.com/ej/help.integration.htm In essence, this works just like a regular HTML form submission, such as when a user fills out a Web page contact form (i.e., enters values into named fields) and clicks Submit to send those data parameters to a form-handler script URL, where the script would receive the data and perform further processing on it (e.g. format and send it as an email, write it to a database, etc.). In this case, your custom script could receive convert the data into a format some 3rd party expects to receive before retransmitting the reformatted data to that party. # POSTED ON: November 10, 2008 @ 19:14 GMT -7 |
|
adambeazley member Posts: 12 |
Thanks Tyson, 2 questions... 1: I'm assuming that the data uses POST and can be retrieved like so in php: $payer_email = $_POST['payer_email']; 2: Also I was just looking at the 3rd party integration link you gave and I noticed that you have the following listed: # address_city # address_state # address_zip # address_country_code but I don't see the street address? Im assuming you are posting the street address, but it just got left off of the support page. Please let me know the name of that particular payment variable. Thanks, Adam # POSTED ON: November 11, 2008 @ 09:00 GMT -7 |
|
adambeazley member Posts: 12 |
Im assuming the answer to my second question is address_street, is that correct? Also, how would I use item_cart_position when using $item_cart_position = $_POST['item_cart_position']; I mean how does item_cart_position really work in this situation? Please show a little php code so i can see how to use it. We sell multiple products and people can buy many different products and different quantities, so I was think about doing a while statement, but not sure how to use the item_cart_position variable. For instance... If someone order 3 products, e-junkie would post item_cart_position 3 times? and the first time it woudl be equal to 1, then 2 then 3? If so how do i capture this and use it correctly? # POSTED ON: November 11, 2008 @ 15:31 GMT -7 |
|
E-junkieChef E-Junkie Crew Posts: 936 |
adambeazleyIm assuming the answer to my second question is address_street, is that correct? Correct adambeazleyAlso, how would I use item_cart_position when using $item_cart_position = $_POST['item_cart_position']; It depends on your integration. If you enter the URL in E-junkie seller admin > Preferences, then you'll get a single POST for the transaction and there will be no item_cart_position. You can simply loop over all the items with the following code <pre> <?php echo "All items this notification is about:"; for ($i=1; $i<=$_POST['num_cart_items']; $i++) { echo "\nItem $i\n"; echo "\nItem Name:".$_POST['item_name'.$i]; echo "\nItem Number:".$_POST['item_number'.$i]; echo "\nQuantity:".$_POST['quantity'.$i]; echo "\nAmount:".$_POST['mc_gross'.$i]; } ?> </pre> If you enter the URL in the product configuration, then you'll still get all the data using POST for the transaction but we'll also include the item_cart_position, so you know which particular item this POST was meant for. <pre> <?php echo "Item this notification is about:"; $i=$_POST['item_cart_pos']; echo "\nItem $i"; echo "\nItem Name:".$_POST['item_name'.$i]; echo "\nItem Number:".$_POST['item_number'.$i]; echo "\nQuantity:".$_POST['quantity'.$i]; echo "\nAmount:".$_POST['mc_gross'.$i]; ?> </pre> # POSTED ON: November 12, 2008 @ 00:02 GMT -7 |
|
adambeazley member Posts: 12 |
Thanks E-JunkieChef, so would something like this work to multiple products into my database: for ($i=1; $i<=$_POST['num_cart_items']; $i++) { $item_namex = $_POST['item_name'.$i]; $item_numberx = $_POST['item_number'.$i]; $quantityx = $_POST['quantity'.$i]; $mc_gross_x = $_POST['mc_gross_'.$i]; mysql_select_db($mysql); $query = "INSERT INTO orders (item_name, item_number, quantity, item_total) VALUES ('$item_namex', '$item_numberx', '$quantityx', '$mc_gross_x')"; mysql_query($query) or die('Error, insert query failed'); } This way I run however many queries as there are items. Thanks for your help, Adam # POSTED ON: November 12, 2008 @ 07:14 GMT -7 |
|
Robin member Posts: 28 |
Yes, it will work. # POSTED ON: November 12, 2008 @ 09:35 GMT -7 |
You must be logged in to make a post. Please click here to login. | |






