<p>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.</p>

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

<plugin-craftcommerce><php><order>
LineItems not showing in CMS
# LineItems not showing in CMS

(Asked by: username_0 on 2020-09-17)

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": " Unpaid",
    "customerLinkHtml": "",
    "orderStatusHtml": " New"
}

What am I missing here?

**Tags:** plugin-craftcommerce, php, order


---

## 1 answers

### Answer by username_0 on 2020-09-17. Score: 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.


---

