if(isset($product->customfields) &&count($product->customfields)) {
foreach($product->customfields as $field) {
if(isset($field->is_cart_attribute) && $field->is_cart_attribute == 1) {
$product->orderable = 0;
break;
}
}
/*if(isset($product->customfields) &&count($product->customfields)) {
foreach($product->customfields as $field) {
if(isset($field->is_cart_attribute) && $field->is_cart_attribute == 1) {
$product->orderable = 0;
break;
}
}
}*/