The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Product to Destination linking in multi-ship data-feed

swinginsamswinginsam Member
in Help edited December 2012
I am currently perusing the XML feed structure example given at http://wiki.foxycart.com/v/1.0/transaction_xml_datafeed for a multi-ship store and would like to clarify something before building the database structure.

What I expected to see was something along the lines of ::

<transaction_details>
  <transaction_detail>
    <product_info_nodes>such as product_id, quantity, price, etc.</product_info_nodes>
    <product_destination_nodes>such as ship_to_firstname, ship_to_address1, ship_to_city, etc.</product_destination_nodes>
  </transaction_detail>
  <transaction_detail>
    <product_info_nodes>such as product_id, quantity, price, etc.</product_info_nodes>
    <product_destination_nodes>such as ship_to_firstname, ship_to_address1, ship_to_city, etc.</product_destination_nodes>
  </transaction_detail>
</transaction_details>

but the way it's structured, I'm seeing ::

<transaction_details>
  <transaction_detail>
    <product_info_nodes>such as product_id, quantity, price, etc.</product_info_nodes>
    <shipto><![CDATA[Me]]></shipto>
  </transaction_detail>
  <transaction_detail>
    <product_info_nodes>such as product_id, quantity, price, etc.</product_info_nodes>
    <shipto><![CDATA[Mother]]></shipto>
  </transaction_detail>
</transaction_details>
<shipto_addresses>
  <shipto_address>
    <address_id><![CDATA[73]]></address_id>
    <address_name><![CDATA[Me]]></address_name>
    <product_destination_nodes>such as ship_to_firstname, ship_to_address1, ship_to_city, etc.</product_destination_nodes>
  </shipto_addresses>
  <shipto_address>
    <address_id><![CDATA[74]]></address_id>
    <address_name><![CDATA[Mother]]></address_name>
    <product_destination_nodes>such as ship_to_firstname, ship_to_address1, ship_to_city, etc.</product_destination_nodes>
  </shipto_addresses>
<shipto_addresses>

which is certainly fine too.

However, while there are both address_ids and address_names in the ship_to_address datum, only the ship_to_name is correlated in the transaction details (with <shipto />). So my question becomes :: Is the only way to correlate between product(s) and their destination(s) the CDATA info in the <shipto /> tag and, if so, what is the point of the <address_id /> tag?

For a number of reasons I would much rather index on an INT rather than CDATA information (and, hence, have a <shipto_id /> tag in the transaction detail). Am I missing something?
Comments
  • fc_adamfc_adam FoxyCart Team
    @swinginsam,

    When working with the API, you can reference a multiship address by either its ID or it's Name. In terms of how the address is assigned to a given product, that is done using it's Name as you have found.
  • Got it. Thanks.
Sign In or Register to comment.