Get product type on event handler
Very minor change to Brad's approach, and with a bit more checking to avoid issues like the product being deleted while the code is looking in that direction, etc. (based on Luke's advice).

foreach ($cart-&gt;lineItems as $item)
{
    // check the purchasable has not been deleted in the meantime
    if ($item-&gt;purchasableId)
    {
        // get the variant and the actual product so we can get to custom fields
        $variant = $item-&gt;purchasable;

        // If there is no product associated with this purchasable, it's a digital virtual product so just skip it
        if (!isset($variant-&gt;product))
        {
            continue;
        }

        // get the actual product element from the purchasable
        $product = $variant-&gt;product;

        // How to get a regular field on the product
        $title = $product-&gt;title;

        // How to get the product type - use handle rather than name, as this is less likely to change
        $productType = $product-&gt;type-&gt;handle;

        ...etc
    }
}