Get last item added to cart Does anyone know a nice way to get the last lineItem(s) added to a cart in craft commerce via twig template? Example use case, an 'added to cart' confirmation page. I know for this you could query param a product/variant id but multiple could be submitted.

I attempted {cart.lineItems | last} but they do not seem to be in date order. I also checked the class models but didn't find any helpful methods or attributes. 

Perhaps some kind of db query, as sql has date fields?
Since multiple line item can be updated or added to the cart at the same time, it would be hard to point to a specific line item that is newest.

The line items have a dateUpdate column you could sort and query on.

{% set result = craft.query()
    .select('*')
    .from('{{%commerce_lineitems}}')
    .where({
        'orderId': cart.id
    })
    .orderBy('dateUpdated ASC')
    .one()
%}


We could look to added a lastUpdateLineItem() method to the order element in future version of Craft Commerce. You can submit the idea here: https://github.com/craftcms/commerce/issues