NEW. Dodanie opcji typ pola własnego

This commit is contained in:
Roman Pyrih
2026-01-20 11:33:18 +01:00
parent 5b02b65665
commit e31074506c
7 changed files with 114 additions and 48 deletions

View File

@@ -1,13 +1,20 @@
<? if ( $this -> custom_fields ): foreach ( $this -> custom_fields as $key => $val ):?>
<div class="custom-field">
<div class="_name">
<?
$custom_field = \shop\ProductCustomField::getFromCache( $key );
echo $custom_field['name'] . ':';
?>
</div>
<div class="_text">
<?= $val;?>
</div>
</div>
<? endforeach; endif;?>
<? 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;?>