• Resolved hpjadmin

    (@hpjadmin)


    Good Afternoon! We have WC connected to Fishbowl Inventory via REST API. Fishbowl pushes products to WC. I noticed recently that when a new product is pushed, stock management is not enabled for the new product even though the option is checked in settings and the inventory quantities are not pushed to WC. After investigation, it looks like it started happening around 10/15/21. Up to that point, everything was working without issue. I have tired to downgrade to the previous version of WC, updated our Fishbowl connector, and made sure that nothing else had been changed around that time. Not receiving any error messages on either end. Would you happen to have any suggestions on how I could further troubleshoot this?

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi @hpjadmin,

    Great question. I would suggest using an app like Postman to make a request to the WooCommerce REST API to update/create a product. You can find all the details about the API in the documentation.

    https://woocommerce.github.io/woocommerce-rest-api-docs/

    If this will work for you outside of Fishbowl, then I would suggest reaching out to them with your findings. If it won’t work then, let us know.

    Thanks!

    Hi @hpjadmin

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.

    Thread Starter hpjadmin

    (@hpjadmin)

    My apologies for the late response. Thank you for the tip, I will give that a try.

    Thread Starter hpjadmin

    (@hpjadmin)

    I tested with postman as suggested. I’m still having issues with the inventory not showing even though manage stock is enabled at the store level. Any help would be appreciated.

    I ran this:

    {
      "name": "Premium Quality",
      "type": "simple",
      "regular_price": "21.99",
      "description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
      "short_description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
      "stock_quantity": "100",
      "categories": [
        {
          "id": 9
        },
        {
          "id": 14
        }
      ],
      "images": [
        {
          "src": "https://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_front.jpg"
        },
        {
          "src": "https://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_back.jpg"
        }
      ]
    }

    And received this response:

    {
        "id": 6154,
        "name": "Premium Quality",
        "slug": "premium-quality",
        "permalink": "https://www.hpjind.com/product/premium-quality/",
        "date_created": "2021-12-14T13:00:02",
        "date_created_gmt": "2021-12-14T18:00:02",
        "date_modified": "2021-12-14T13:00:02",
        "date_modified_gmt": "2021-12-14T18:00:02",
        "type": "simple",
        "status": "publish",
        "featured": false,
        "catalog_visibility": "visible",
        "description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
        "short_description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
        "sku": "",
        "price": "21.99",
        "regular_price": "21.99",
        "sale_price": "",
        "date_on_sale_from": null,
        "date_on_sale_from_gmt": null,
        "date_on_sale_to": null,
        "date_on_sale_to_gmt": null,
        "on_sale": false,
        "purchasable": false,
        "total_sales": 0,
        "virtual": false,
        "downloadable": false,
        "downloads": [],
        "download_limit": -1,
        "download_expiry": -1,
        "external_url": "",
        "button_text": "",
        "tax_status": "taxable",
        "tax_class": "",
        "manage_stock": false,
        "stock_quantity": null,
        "backorders": "no",
        "backorders_allowed": false,
        "backordered": false,
        "low_stock_amount": null,
        "sold_individually": false,
        "weight": "",
        "dimensions": {
            "length": "",
            "width": "",
            "height": ""
        },
        "shipping_required": true,
        "shipping_taxable": true,
        "shipping_class": "",
        "shipping_class_id": 0,
        "reviews_allowed": true,
        "average_rating": "0",
        "rating_count": 0,
        "upsell_ids": [],
        "cross_sell_ids": [],
        "parent_id": 0,
        "purchase_note": "",
        "categories": [
            {
                "id": 325,
                "name": "Products",
                "slug": "products"
            }
        ],
        "tags": [],
        "images": [
            {
                "id": 6152,
                "date_created": "2021-12-14T07:59:59",
                "date_created_gmt": "2021-12-14T17:59:59",
                "date_modified": "2021-12-14T07:59:59",
                "date_modified_gmt": "2021-12-14T17:59:59",
                "src": "https://www.hpjind.com/wp-content/uploads/2021/12/T_2_front-1.jpg",
                "name": "T_2_front-1.jpg",
                "alt": ""
            },
            {
                "id": 6153,
                "date_created": "2021-12-14T08:00:00",
                "date_created_gmt": "2021-12-14T18:00:00",
                "date_modified": "2021-12-14T08:00:00",
                "date_modified_gmt": "2021-12-14T18:00:00",
                "src": "https://www.hpjind.com/wp-content/uploads/2021/12/T_2_back-1.jpg",
                "name": "T_2_back-1.jpg",
                "alt": ""
            }
        ],
        "attributes": [],
        "default_attributes": [],
        "variations": [],
        "grouped_products": [],
        "menu_order": 0,
        "price_html": "",
        "related_ids": [
            6108,
            6146,
            6145,
            6066,
            6082
        ],
        "meta_data": [],
        "stock_status": "instock",
        "_links": {
            "self": [
                {
                    "href": "https://www.hpjind.com/wp-json/wc/v3/products/6154"
                }
            ],
            "collection": [
                {
                    "href": "https://www.hpjind.com/wp-json/wc/v3/products"
                }
            ]
        }
    }

    Hey @hpjadmin,

    Looking at the documentation, it appears that this is false by default.

    I would suggest explicitly including the manage_stock parameter and setting it to true. See if something like this works:

    
    {
      "name": "Premium Quality",
      "type": "simple",
      "regular_price": "21.99",
      "description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
      "short_description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
      "manage_stock": true,
      "stock_quantity": "100",
      "categories": [
        {
          "id": 9
        },
        {
          "id": 14
        }
      ],
      "images": [
        {
          "src": "https://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_front.jpg"
        },
        {
          "src": "https://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_back.jpg"
        }
      ]
    }
    

    Let us know how that goes.

    Thread Starter hpjadmin

    (@hpjadmin)

    That worked. I’ve have “Enable stock management” checked under product settings. Wouldn’t this override/force stock management at the item level?

    > I’ve have “Enable stock management” checked under product settings. Wouldn’t this override/force stock management at the item level?

    Great question. What that does is enable the stock management system. When it’s disabled the only options are in-stock, out of stock, and on backorder. When it’s enabled, you can still select those or you can enter a stock level. The level is optional though. Does that make sense?

    Thread Starter hpjadmin

    (@hpjadmin)

    Yeah, I think so. Based on this, it looks like the WC system is working as it should, and I need to reach out to Fishbowl to see what changed on their end?

    That sounds like a good next step to me. If you have any questions, just let us know ??

    Thread Starter hpjadmin

    (@hpjadmin)

    We were able to get this resolved. It was an timestamp issue in Fishbowl that was causing this error. I appreciate all your help!

    @hpjadmin

    Glad to hear it – thanks for letting us know!

    If you have any further questions, I recommend creating a new thread.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Stock management not enabled for new products’ is closed to new replies.