Hi,
The system won't set the values of the custom fields when the variants are generated.
So if you never edit a variant, it will automatically inherit the value of the main product on the frontend.
If you edit a variant, then the default values will be displayed in the custom fields and if you click on "save", it will save these values.
So the best would be to have empty default values for all your custom product fields, or to remove the custom fields area from the variant edit interface. This can be done by removing the code:
if(!empty($this->fields) && hikashop_acl('product/edit/customfields')) {
foreach($this->fields as $fieldName => $oneExtraField) {
?>
<dl id="<?php echo $this->fieldsClass->prefix; ?>product_<?php echo $fieldName; ?>" class="hika_options">
<dt class="hikashop_product_<?php echo $fieldName; ?>"><label><?php echo $this->fieldsClass->getFieldName($oneExtraField); ?></label></dt>
<dd class="hikashop_product_<?php echo $fieldName; ?>"><?php
$onWhat = 'onchange';
if($oneExtraField->field_type == 'radio')
$onWhat = 'onclick';
echo $this->fieldsClass->display($oneExtraField, $this->product->$fieldName, 'data[variant]['.$fieldName.']', false, ' '.$onWhat.'="window.hikashop.toggleField(this.value,\''.$fieldName.'\',\'product\',0,\''.$this->fieldsClass->prefix.'\');"');
?></dd>
</dl>
<?php }
}
from the product / variant view file via the menu Display>Views.
Note however, that if the fields are "required", then the system won't allow the saving without the custom field.