if ( $this -> custom_fields ) : ?> foreach ( $this -> custom_fields as $key => $val ) : ?> $custom_field = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->findCustomFieldCached( $key ); ?> $field_type = !empty( $custom_field['type'] ) ? $custom_field['type'] : 'text'; ?> if ( $field_type == 'text' ) : ?>