update
This commit is contained in:
@@ -1,20 +1,26 @@
|
||||
<? if ( $this -> custom_fields ) : ?>
|
||||
<? foreach ( $this -> custom_fields as $key => $val ) : ?>
|
||||
<? $custom_field = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->findCustomFieldCached( $key ); ?>
|
||||
|
||||
<? if ( $custom_field['type'] == 'text' ) : ?>
|
||||
<? $field_type = !empty( $custom_field['type'] ) ? $custom_field['type'] : 'text'; ?>
|
||||
|
||||
<? if ( $field_type == 'text' ) : ?>
|
||||
<div class="custom-field">
|
||||
<div class="_name">
|
||||
<?
|
||||
echo $custom_field['name'] . ':';
|
||||
?>
|
||||
<?= htmlspecialchars( $custom_field['name'] ) . ':'; ?>
|
||||
</div>
|
||||
<div class="_text">
|
||||
<?= $val;?>
|
||||
<?= nl2br( htmlspecialchars( $val ) );?>
|
||||
</div>
|
||||
</div>
|
||||
<? elseif ( $field_type == 'image' && !empty( $val ) ) : ?>
|
||||
<div class="custom-field">
|
||||
<div class="_name">
|
||||
<?= htmlspecialchars( $custom_field['name'] ) . ':'; ?>
|
||||
</div>
|
||||
<div class="_image">
|
||||
<img src="<?= htmlspecialchars( $val );?>" alt="<?= htmlspecialchars( $custom_field['name'] );?>">
|
||||
</div>
|
||||
</div>
|
||||
<? elseif ( $custom_field['type'] == 'image' ) : ?>
|
||||
|
||||
<? endif; ?>
|
||||
<? endforeach; ?>
|
||||
<? endif;?>
|
||||
Reference in New Issue
Block a user