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.

Category Does Not Exist Response Error

billywhite4billywhite4 Member
in Bugs & Feature Requests edited February 2012
I'm probably missing something simple here, but didn't see anything else about it in the forums. We've had a couple issues pop-up where customers have included categories in their orders that don't exist in their store setup. Each time it's taken us a good bit to debug because it doesn't result in any errors in the js response.

This prompted us to add checks to make sure the category exists before an item is added to a cart, but wondered if there was something we were missing in the FC response that indicates an illegal category is being used. Anyone with suggestions for a good way to handle category validation?
  • fc_adamfc_adam FoxyCart Team
    edited February 2012

    Is this for products that are being added to cart using jsonp? How exactly are customers able to edit the category in your add to cart link/form that it's adding categories that don't exist?

    In terms of checking if the add to cart worked or not, if it didn't - like if it's an invalid category - the errors node of the returned JSON will be filled with an error, such as:
    "errors":["<b>categoryName</b> does not appear to be a valid category. Please login to your account manager and update your category list."]

    If you need any further help, perhaps if you can link us to your add to cart page, that would be helpful.
  • Thanks, Adam. Not quite sure how we missed that the first time. I'd like to think for my sake it wasn't there, but on a test am now seeing the same thing in the response:
    "errors":["<b>test</b> does not appear to be a valid category. Please login to your account manager and update your category list."],

    In our case, the clients add categories through the Sitemason CMS and we've had a couple situations where users don't realize it's related to FoxyCart categories. We've had a bugger of a time troubleshooting both times it's happened, but for now we'll assume it's cause we're blind! We're using 7.1 for reference if it happens to anyone else.
Sign In or Register to comment.