Hi,
This is doable but this might give you some problem if you have multiple custom fields type in your website.
For instance; if you are using "generic child variant" ONLY in your website, you will be good to go, but if you have "generic child product" but also have some other "custom fields" types as well. Then this would give a confusion to because the PHP patch that i am going to give you below will hide the "stock info" from all parent products. (if any product doesn't have custom field at all, they won't be affected from this change)
Open this PHP file:
templates/....../html/com_virtuemart/productdetails/default_addtocart.php
and find this PHP lines:
<div class="FlexibleInStock"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_IN_STOCK'); ?></div>
<?php if (VmConfig::get ( 'display_stock', 1 )) { ?><div class="FlexibleInStockLevel"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP'); ?>: (<?php echo $this->product->product_in_stock; ?>)</div> <?php } ?>
(they are around 102nd and 103rd lines by default)
And change them with these:
<?php if (empty($this->product->customfieldsCart)) { ?>
<div class="FlexibleInStock"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_IN_STOCK'); ?></div>
<?php if (VmConfig::get ( 'display_stock', 1 )) { ?><div class="FlexibleInStockLevel"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP'); ?>: (<?php echo $this->product->product_in_stock; ?>)</div> <?php } ?>
<?php } ?>
In case you don't see it, I added extra IF...END condition to show the stock information. So, if that particular parent product includes some "Cart" custom field, then the stock text won't appear. This is what you are looking for, the parent product won't show any stock text, but it will be shown when the child product is chosen.
Regards.