Hello,
For this you have to create an override view for show_block_custom_main.
Create a condition, that check that your quantity = 0 AND a check to see if this is the right Custom field, thanks to his ID.
You can use this kind of structure :
IF ( (Quantity != 0) && (Custom field != Right ID) ) {
DISPLAY custom field
}
You need to get your custom field Id, in my example it's 29
Around line 14, You have this :
...
if(!empty($value) || $value === '0') {
$displayTitle = true;
?>
<tr class="hikashop_product_custom_<?php echo $oneExtraField->field_namekey;?>_line">
<td class="key">
<span id="hikashop_product_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_name">
<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
</span>
</td>
<td>
<span id="hikashop_product_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_value">
<?php echo $this->fieldsClass->show($oneExtraField,$value); ?>
</span>
</td>
</tr>
<?php
}
...
Replace it by this :
...
if(!empty($value) || $value === '0') {
$displayTitle = true;
if ( ($this->element->product_quantity != 0) && ($this->fields[$fieldName]->field_id != 29) ) {
?>
<tr class="hikashop_product_custom_<?php echo $oneExtraField->field_namekey;?>_line">
<td class="key">
<span id="hikashop_product_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_name">
<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
</span>
</td>
<td>
<span id="hikashop_product_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_value">
<?php echo $this->fieldsClass->show($oneExtraField,$value); ?>
</span>
</td>
</tr>
<?php }
}
...
Hope this will help you to get what you need.
Regards