Sync_order Trying to Get Property of Non Object
Sync_order Trying to Get Property of Non Object
Issue:
B2B Trade Store: Trying to Get Property of Non Object
Solution:
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:
- Enter your Stock2Shop console.
- Follow this guide to re-link the affected product(s).
- 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.