Datafeed Error

nathannathan Member
in Help edited October 2012
Hi, I'm still getting a datafeed error between FoxyCart and PerchCMS. The perch shop app has been updated a couple of times and in the release notes is states that it has been updated to work with the new updates that FoxyCart has made. But none of my stock levels change with a sales and the customer can put any quantity they want into the cart regardless of stock levels. THis is a bit of a nightmare as the sites live and people are buying.

I suspect this is not the fault with FoxyCart, but with the 'link-up' between them both. The error log is still showing datafeed errors with each transaction. But if Perch are saying they have updated the app to work them they must have tested these issues as they were aware of them.

Do you think there is anything in the FC setup that I am doing wrong or something I should be doing as I cannot figure it out.

scrummypressies dot co dot uk

  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Hi Nathan, I think you'd be best served to take the specific error you are seeing in the datafeed to Perch so that they can adjust the datafeed based on that error. I'm not sure there's anything that FoxyCart can do about it since it has to do with how Perch is handling the data that Foxy is sending.
  • Hi. I have contacted them again so hopefully it can get sorted out. I was just wondering whether there was anything that I may have done wrong in the FC admin that may be causing an issue as it's been like this for a few months now and as we are coming up to xmas I dont want a shop selling items that aren't there as the stock level isn't working.
  • fc_adamfc_adam FoxyCart Team

    While it could be possible, I don't think any changes in the admin should affect a general integration like Perch's is.

    Looking at the error in your error log, it's saying the script is using a function that expects a string but is being passed an array - so that's something Perch would be able to help you with.
  • Thanks

    And sorry for all the questions just trying to isolate the problem.

    A customer can also enter any number they want in to the cart, even if I only have 1 item left. Would this be a Perch issue too? I have about 200 items in the Perch database all with different stock levels and at the moment a client can purchase anything. Meaning, I have to refund them when they order over my stock limit.

    Just want to make sure that there are no stock limit controls I have to manage in FC (I'm sure there's not as FC doesn't store that info)

  • fc_adamfc_adam FoxyCart Team

    That's right - it would be something Perch would need to add, not something you'd set in FoxyCart.

    What you'd need to do on your end is when the add to cart link/form is built out, to get the inventory level and set that as the quantity_max attribute for that product. So if you have 200 left in stock, that's the most a customer could buy at that time.
  • Thanks Adam.

    This is the reply from Perch:
    "In short, I don't know if we can pass the stock level in to FC when the product is added. I think that's when it would need to be done, to prevent the user from adjusting the qty in the cart."

    So, going round in circles a bit.

    If I have a product that didn't rely on stock levels I would be sorted, but it's this area that is broken at present, and not sure if the Perch app will be able to get it working

    Thanks for your replies though.
  • fc_adamfc_adam FoxyCart Team
    edited October 2012
    Hi Nathan,

    Do you have control over the add to cart links/forms or is this something that the PerchCMS does for you?

    Basically, if for example you had 90 red balloons left in stock, your add to cart form might look like this:
    <form action=""; method="post" accept-charset="utf-8">
      <input type="hidden" name="name" value="balloon" />
      <input type="hidden" name="price" value="2" />
      <input type="hidden" name="color" value="red" />
      <input type="hidden" name="quantity_max" value="90" />
      <input type="text" name="quantity" />
      <input type="submit" name="submit" value="Add To Cart" />

    So essentially when the product link or form is added to the page, you need to be able to get from the database how much of the product is left as well.

    Perhaps if you reply to Perch and cc our helpdesk email into that, we can assist with any confusion as to how it might work.
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    And just as a side-note: this inventory method works well in an environment that isn't extremely high usage with small inventories. In an purchase environment like that, the inventory doesn't get lowered until the order is complete so you could have some overbuying by people who had the product in their cart at the same time.
  • fc_adamfc_adam FoxyCart Team

    Great point - thanks for adding that.
  • Adam, Perch does everything for me although I will delve deeper to see if I can gain access to the forms.

    Sparkweb, my site is low usage so the overlap is acceptable - we're not worried too much about the customer sessions on the site, we can cross that bridge if we need to. Thank you.
Sign In or Register to comment.