<? if ( $this -> custom_fields ) : ?>
  <? foreach ( $this -> custom_fields as $key => $val ) : ?>
    <? $custom_field = \shop\ProductCustomField::getFromCache( $key ); ?>
    
    <? if ( $custom_field['type'] == 'text' ) : ?>
      <div class="custom-field">
        <div class="_name">
          <?
            echo $custom_field['name'] . ':';
          ?>
        </div>
        <div class="_text">
          <?= $val;?>
        </div>
      </div>
    <? elseif ( $custom_field['type'] == 'image' ) : ?>

    <? endif; ?>
  <? endforeach; ?>
<? endif;?>