12 / 12
Jul 2014

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

  • created

    Sep '08
  • last reply

    Jul '14
  • 11

    replies

  • 1.6k

    views

  • 6

    users

  • 4

    links

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.

10 days later

You can do that already using our integration feature. We use that feature to provide integration with SwiftCD.

1 month later
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.



You can then write a script to the the POST data and format it into the XML structure you need.






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

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.

Thanks Tyson,



2 questions...



1: I'm assuming that the data uses POST and can be retrieved like so in php:



$payer_email = $POST['payeremail'];



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

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['itemcart_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?

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'];



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 would be equal to 1, then 2 then 3? If so how do i capture this and use it correctly?





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['numcart_items']; $i++) {

echo "\nItem $i\n";

echo "\nItem Name:".$POST['itemname'.$i];

echo "\nItem Number:".$POST['itemnumber'.$i];

echo "\nQuantity:".$_POST['quantity'.$i];

echo "\nAmount:".$POST['mcgross'.$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['itemcart_pos'];



echo "\nItem $i";

echo "\nItem Name:".$POST['itemname'.$i];

echo "\nItem Number:".$POST['itemnumber'.$i];

echo "\nQuantity:".$_POST['quantity'.$i];

echo "\nAmount:".$POST['mcgross'.$i];



?>

</pre>

Thanks E-JunkieChef,



so would something like this work to multiple products into my database:



for ($i=1; $i<=$POST['numcart_items']; $i++) {

$item_namex = $POST['itemname'.$i];

$item_numberx = $POST['itemnumber'.$i];

$quantityx = $_POST['quantity'.$i];

$mc_gross_x = $POST['mcgross_'.$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

5 years later
CRMHi



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





Since Kunaki was mentioned in this post, I wanted to take a minute to mention a new service called cartWiz which will integrate E-junkie and Kunaki: http://www.cartwiz.com/



cartWiz extends what E-junkie can do, by connecting E-junkie to many useful 3rd-party services (Kunaki included). cartWiz allows merchants to set purchase-based rules - from the web - that cause specific actions to happen if a customer makes a purchase that triggers whatever rule(s) the merchant has set.



For E-junkie users who want to use Kunaki, here's what cartWiz can make possible:



* Fully automatic CD and DVD fulfillment

* Smart, purchase-based fulfillment rules

* One item in E-junkie can be set to trigger more than one CD or DVD to be sent to the customer (good for bundled products)

* Easy shipping rule set-up

* Full set-up in less than 10 minutes

* No programming or technical knowledge required

* No installation time or server headaches - all the work happens in the cloud automatically, without you ever needing to install a single script

* More details here: http://www.cartwiz.com/integration-kunaki.html



Quick disclaimer: I developed cartWiz, so I'm most definitely biased in thinking it's pretty slick. :slight_smile: Nonetheless, it's at least worth checking out the free trial if you want to integrate Kunaki with your E-junkie cart.



Please let me know if I can help you get started, or if you have any questions.



Best Regards,

--

Andrew Dolbin-MacNab

Founder and Director

AKA "Chief Executive Wiz"

http://www.cartwiz.com/