How do I?:
- Get the current cart in commerce
- For each item in the cart, check its product type?
I want to do the following:
foreach($cart_items as $item){
if($item[product_type]=='X'){
//perform a task
}
}
I want to use this in the module code for a custom checkout pane.
checkout_pane_eventinfo_pane_checkout_form()