Coupon Code in Datafeed

jaushmanjaushman Member
in Bugs & Feature Requests edited March 2011
I've noticed that discount codes are not being sent in the XMl from the API. Our client is implementing some new accounting software and needs those codes for reporting.

We are on store version 0.7.0. Doing some digging and it looks like those stopped coming when we upgraded our store version. That's a guess on my end but it all happened around that same time.

Here is a sample of the discounts XML returned by the API for a recent transaction that used a coupon. As you can see...the code parameter is empty when it should show the coupon code:
<discounts>
     <discount>
          <code/>
          <valid_categories/>
          <name><![CDATA[coupon testcode-123]]></name>
          <amount><![CDATA[-17.5]]></amount>
          <display><![CDATA[-25%]]></display>
          <coupon_discount_type/>
          <coupon_discount_details/>
     </discount>
</discounts>
Comments
  • lukeluke FoxyCart Team
    Hey jaushman, thanks for posting. We'll take a look and let you know what we find.
  • lukeluke FoxyCart Team
    Yeah, sure enough, it was broken. All the way back, actually. We just rolled out a fix for versions 051, 060, 070 and 071 so it should be working correctly now.
  • Should this XML also be including the values for these two:
    coupon_discount_type
    coupon_discount_details

    Here's a sample of what the datafeed in FC2.0 returns:
    <discounts>
    <discount>
    <code><![CDATA[CODEXYZ]]></code>
    <valid_categories></valid_categories>
    <name><![CDATA[_test]]></name>
    <amount><![CDATA[-50]]></amount>
    <display><![CDATA[-50.00]]></display>
    <coupon_discount_type><![CDATA[]]></coupon_discount_type>
    <coupon_discount_details><![CDATA[]]></coupon_discount_details>
    </discount>
    </discounts>

    I assume those two should return what is seen on the admin section on the Foxycart website when creating coupons? Anything I should different to get those values?
  • I looked at XML I saved from a datafeed using a FC1.1 and coupon_discount_type and coupon_discount_details were being fed correctly.

    <coupon_discount_type><![CDATA[quantity_percentage]]></coupon_discount_type>
    <coupon_discount_details><![CDATA[1-33]]></coupon_discount_details>

    Am I doing something incorrect if I don't see it in my datafeeds now or was this broken in 2.0? If it's broken, any ETA on when this could be fixed?

    Thanks!
  • fc_adamfc_adam FoxyCart Team
    @jerryforeman,

    It should definitely be displaying that information. We'll look into that on our side and get back to you as soon as we can.
Sign In or Register to comment.