Sync_order Trying to Get Property of Non Object

Sync_order Trying to Get Property of Non Object


B2B Trade Store: Trying to Get Property of Non Object


Error description

Orders failed to sync.

Error solution

When the API sends the order to Stock2Shop, our system does a couple of checks:

  • Does the SKU exist in Stock2Shop?
  • Is the product correctly linked on the channel to the ID saved on Stock2Shop?

In order to confirm the source of the queue error, follow the below steps, noting the channel IDs during the process:

  • Log in to the Stock2Shop console.
  • Navigate to the Queue > View.
  • Click on the 3 dots of the order error > click View Item.
  • Scroll down on the payload to (“line_items”:).
  • For each item on the order, write down the channel_product_code, channel_variant_code and SKU.
  • Once the IDs have been written down, navigate to Products > View.
  • Search for the SKUs on the order one at a time.
  • Once you find a SKU, click on the 3 dots > click Edit.
  • Navigate to the CHANNELS tab.
  • Compare the IDs for the SKU with the IDs stored on the product.
  • If the IDs match then move onto the next SKU.
  • If the IDs do not match, see below to resolve the error.

Once the SKUs that are not linked have been found, follow the below steps to re-link the product:

  • Reset the product in Stock2Shop by navigating to Products > View > Search > 3 dots > Edit > CHANNELS tab.
  • Click REMOVE ALL on the channel that needs resetting.
  • Click Save on the GENERAL and VARIANTS tabs.
  • This will prompt Stock2Shop to scan the website database for a matching SKU to establish new links.
  • You will need to skip the “Trying to get property of non-object” error and skip any further updates for this specific product if they were already in the queue (it can be multiple SKUs, depending on the SKUs connected to the product).
  • A new “add” item will appear at the back of the queue to re-add the product to the website.
  • Once the SKU has been re-linked, navigate to Orders > View.
  • Search for the order number found in the payload (near the top of the payload labelled “name”).
  • Click on the 3 dots of the order > click View.
  • Click EDIT near the top right of the order screen.
  • Then click RESET near the bottom left of the order.
  • Navigate back to the Queue > View.
  • Click on the 3 dots of the order error > Click Try Again.
  • The order should now process.