می تونید از کد زیر استفا ده کنید مثلا :
<?php
if (!VmConfig::get('use_as_catalog', 0) && !$product->customfields) {
echo shopFunctionsF::renderVmSubLayout('addtocartbar',array('product'=>$product));
} else if($product->customfields){
echo '<style>.custom_fields{background: white;border: 1px solid #ddd;padding: 5px;display:block;border-radius: 3px;margin: 10px;color: #999!important;} .custom_fields:hover{background: #DF1F26;color: white!important;}</style>';
echo '<a class="custom_fields" style="" href="'.JURI::base().$product->link.'">'.vmText::_("COM_VIRTUEMART_CART_ADD_TO").'</a>';
}
?>