Check for value of product title in cart drawer

Currently using Envy theme and in the cart-drawer I want to do something depending on the contents of the product title.

The file is cart-drawer.liquid, but I can’t figure out how to get the title (or price) of the current product that’s being displayed.

Does anyone know how to get this information?

It normally uses the regular cart fields, like cart.items_subtotal_price but I need to check it for the current item in the cart.

I’ve tried cart.items.line_item.product.title for example, but whatever I try to come up with, it never returns a value…

Hi @DutchDelight ,

Find the code below

{%- for item in cart.items -%}

then use the below code inside the loop to get the product title

item.product.title

Hope this will help…