Answer the question
In order to leave comments, you need to log in
How to change array value in joomshopping features?
Good day.
There is such a loop with an array
<?php if (is_array($this->product->extra_field)){?>
<div class="extra_fields">
<?php foreach($this->product->extra_field as $extra_field){?>
<?php if ($extra_field['grshow']){?>
<div class='block_efg'>
<div class='extra_fields_group'><?php print $extra_field['groupname']?></div>
<?php }?>
<?php print_r ($extra_field);?>
<div class="extra_fields_el extra_fields_<?php print $extra_field['id'];?>">
<span class="extra_fields_name"><i class="ef_<?php print $extra_field['id'];?>"></i><?php print $extra_field['name'];?></span><?php if ($extra_field['description']){?>
<span class="extra_fields_description">
<?php print $extra_field['description'];?>
</span><?php } ?>:
<span class="extra_fields_value">
<?php print $extra_field['value'];?>
</span>
</div>
<?php if ($extra_field['grshowclose']){?>
</div>
<?php }?>
<?php }?>
</div>
<?php }?>
Answer the question
In order to leave comments, you need to log in
I'll answer my own question.
Passing $extra_field['value'] to a variable
<?php foreach($this->product->extra_field as $extra_field){?>
<?php $valuess = $extra_field['value'];?>
<span class="extra_fields_value">
<?php if ($valuess == 'Есть'){
$fildval = '<i class="da"></i>';
} elseif ($valuess == 'Нет'){
$fildval = '<i class="net"></i>';
} else {
$fildval = $valuess;
}
?>
<?php print $fildval;?>
</span>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question