1

I'm scratching my head. My orders are shown perfectly except for one product. I have no idea why so I looked at the Order object before saving and I can't seem to figure out why he won't show the lineitems in the CMS.

This is my object:

{
    "number": "17092020135106598",
    "reference": "They Were Soldiers",
    "couponCode": null,
    "isCompleted": true,
    "dateOrdered": {
        "date": "17/09/2020",
        "time": "13:53"
    },
    "datePaid": {
        "date": "17/09/2020",
        "time": "13:53"
    },
    "dateAuthorized": null,
    "currency": "EUR",
    "gatewayId": 1,
    "lastIp": "81.82.213.80",
    "message": null,
    "returnUrl": null,
    "cancelUrl": null,
    "orderStatusId": "1",
    "orderLanguage": "en-BE",
    "origin": "web",
    "billingAddressId": null,
    "shippingAddressId": null,
    "makePrimaryShippingAddress": null,
    "makePrimaryBillingAddress": null,
    "shippingSameAsBilling": null,
    "billingSameAsShipping": null,
    "estimatedBillingAddressId": null,
    "estimatedShippingAddressId": null,
    "estimatedBillingSameAsShipping": null,
    "shippingMethodHandle": "freeShipping",
    "customerId": 191,
    "registerUserOnOrderComplete": null,
    "paymentSourceId": null,
    "storedTotalPrice": null,
    "storedTotalPaid": null,
    "storedItemTotal": null,
    "storedTotalShippingCost": null,
    "storedTotalDiscount": null,
    "storedTotalTax": null,
    "storedTotalTaxIncluded": null,
    "id": 614,
    "tempId": null,
    "draftId": null,
    "revisionId": null,
    "uid": "9ffedad4-5318-4b66-95db-f0f0f3c3418a",
    "fieldLayoutId": 1,
    "contentId": "613",
    "enabled": true,
    "archived": false,
    "siteId": "1",
    "title": null,
    "slug": null,
    "uri": null,
    "dateCreated": {
        "date": "17/09/2020",
        "time": "13:53"
    },
    "dateUpdated": {
        "date": "17/09/2020",
        "time": "13:53"
    },
    "dateDeleted": null,
    "trashed": false,
    "propagateAll": true,
    "newSiteIds": [],
    "resaving": false,
    "duplicateOf": null,
    "previewing": false,
    "hardDelete": false,
    "ref": null,
    "status": "enabled",
    "structureId": null,
    "url": null,
    "adjustmentSubtotal": 0,
    "adjustmentsTotal": 0,
    "paymentCurrency": "EUR",
    "email": "xx@xxxxx.xx",
    "isPaid": false,
    "itemSubtotal": 98.2000000000000028421709430404007434844970703125,
    "itemTotal": 98.2000000000000028421709430404007434844970703125,
    "lineItems": [
        {
            "id": 247,
            "description": "They Were Soldiers - 25mm Miniatures",
            "price": 98.2000000000000028421709430404007434844970703125,
            "saleAmount": 0,
            "salePrice": 98.2000000000000028421709430404007434844970703125,
            "weight": 0,
            "length": 0,
            "height": 0,
            "width": 0,
            "qty": 1,
            "sku": "TWSKS2021",
            "note": "",
            "privateNote": null,
            "purchasableId": "571",
            "orderId": 614,
            "lineItemStatusId": null,
            "taxCategoryId": 1,
            "shippingCategoryId": 1,
            "dateCreated": "2020-09-17T13:53:07+02:00",
            "adjustments": [],
            "options": [],
            "optionsSignature": "d751713988987e9331980363e24189ce",
            "onSale": false,
            "total": 98.2000000000000028421709430404007434844970703125,
            "priceAsCurrency": "98,20 €",
            "saleAmountAsCurrency": 0,
            "salePriceAsCurrency": "98,20 €",
            "subtotalAsCurrency": "98,20 €",
            "totalAsCurrency": "98,20 €",
            "subtotal": 98.2000000000000028421709430404007434844970703125
        }
    ],
    "orderAdjustments": [],
    "outstandingBalance": 98.2000000000000028421709430404007434844970703125,
    "paidStatus": "unpaid",
    "recalculationMode": "none",
    "shortNumber": "1709202",
    "totalPaid": 0,
    "total": 98.2000000000000028421709430404007434844970703125,
    "totalPrice": 98.2000000000000028421709430404007434844970703125,
    "totalQty": 1,
    "totalSaleAmount": 0,
    "totalTaxablePrice": 98.2000000000000028421709430404007434844970703125,
    "totalWeight": 0,
    "adjustmentSubtotalAsCurrency": "0 €",
    "adjustmentsTotalAsCurrency": "0 €",
    "itemSubtotalAsCurrency": "98,20 €",
    "itemTotalAsCurrency": "98,20 €",
    "outstandingBalanceAsCurrency": "98,20 €",
    "totalPaidAsCurrency": "0 €",
    "totalAsCurrency": "98,20 €",
    "totalPriceAsCurrency": "98,20 €",
    "totalSaleAmountAsCurrency": "0 €",
    "totalTaxablePriceAsCurrency": "98,20 €",
    "totalTaxAsCurrency": "0 €",
    "totalTaxIncludedAsCurrency": "0 €",
    "totalShippingCostAsCurrency": "0 €",
    "totalDiscountAsCurrency": "0 €",
    "paidStatusHtml": "<span class=\"commerceStatusLabel\"><span class=\"status red\"></span> Unpaid</span>",
    "customerLinkHtml": "",
    "orderStatusHtml": "<span class=\"commerceStatusLabel\"><span class=\"status yellow\"></span> New</span>"
}

What am I missing here?

1

Fixed it! The problem was that somehow, with that product, there was an issue with setting the status of the order to 'Paid'. Once I got that working, I saw the lineitems in my order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.