XML feed

pixillionsaulpixillionsaul Member
in Bugs & Feature Requests edited October 2007
Hi guys,

Ive been experimenting with a test site, and I've ran into a problem with the XML feed and the modx inventory snippet.

After I make an order, it looks like the xml feed keeps on sending the order through, which obviously reduces the stock count indefinatley, I think I read somewhere that it gets sent every minute, could it not be getting wiped clean after it is sent out the first time perhaps? Thanks in advance for any help.
Comments
  • lukeluke FoxyCart Team
    Hey pixillionsaul, have you checked that the page you're sending the XML data to is working correctly? The datafeed will send all transactions that are not marked as "fed". If your processor completes successfully it should return "foxy". If it returns anything else, FoxyCart assumes there was an error and keeps trying to send the transaction. See http://wiki.foxycart.com/integration:campaign_monitor as an example. It may be that your MODx page is returning more data than it should.
  • Hi luke, thanks for a quick reply. I still havn't fixed it though I'm afraid. I can't see any problems in the Modx snippet, and the test.xmldatafeed.php file returns "foxy" so it looks like it's working, I've also tried changing the XML data feed version number from the foxycart control panel, but it still continues to reduce the stock indefinatley. Ive also changed the inventory php file to return "foxy" regardless of a failed order, but the stock still continues to be reduced every minute.
    Thanks in advance
  • brettbrett FoxyCart Team
    Hmmm... We'll take a look. Could be something got wonky somewhere on our end. Have you modified the snippet at all, or are you dealing with it as it is on the wiki?
  • Yeh I hadn't changed anything from as it is on the modx wiki page, although now, its edited to output "foxy" regardless of any errors, still taking stock off every minute though. Any ideas?
  • I am having the exact same problem using the modx snippet from their site: http://modxcms.com/FoxyCart-Inventory-1493.html

    I set it up according to the snippet instructions and it counts down indefinitely.

    Thank you for looking into it!
  • brettbrett FoxyCart Team
    edited October 2007
    Well that certainly looks like a problem on our end. We'll be taking a look at this in the next couple of hours (Brett sucks at expectations) soon and will update as soon as we've figured it out. Sorry for the problems.
  • brettbrett FoxyCart Team
    Ok, just for double checking, is the document that the snippet is called on (where FoxyCart is sending the XML to) a blank template? If there's anything at all other than "foxy" in the response, it'll assume something went wrong.

    Can you check on that and let us know?
  • lukeluke FoxyCart Team
    pixillionsaul, I just loaded up your XML processor page and it returned "foxy" with a carriage return on the end. That might be the problem... we're still looking into it though. Just to make things easier on everyone, we'll go ahead and throw in a trim statement on the output. Most likely, the page you setup to call your snippet has a carriage return at the end.
  • lukeluke FoxyCart Team
    John, you may have the same thing going on. I loaded up your page and saw the expected error, but there was also a carriage return at the end of it. We're going to modify the documentation for the MODx snippet to let people know they have to remove all white space after the snippet call to make it work properly.

    Thanks for helping us make FoxyCart more Foxy.
  • Woo hoo, its fixed! Removed the whitespace after the snippet call and the content call in the template, and the inventory has stopped decreasing. Cheers for your help guys!

    Saul
  • I took a look at my datafeed content and it did have a carriage return after it. I removed that and all seems well. Thanks for all your help!
    John
  • lukeluke FoxyCart Team
    Excellent, great to hear!
Sign In or Register to comment.