If you have customized the CleanMart product details page, here is the code snippet you should embed to enable the "Related Products" Tab.
Open the product details page:
/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php
Find the <ul id="vmtabs" class="shade tabs">..... </ul> to list the TABs. Just before the </ul>, enter this code snippet:
<?php if (!empty($this->product->customfieldsSorted['related_products'])) { ?>
<li><a href="javascript:void(0)" rel="#relatedProducts"><span><?php echo JText::_('COM_VIRTUEMART_RELATED_PRODUCTS');?></span></a></li>
<?php } ?>
Then, find this DIV element: <div class="tabcontent-container"> .... </div> (that's a very long div, make sure to find the start and end of that element)
Right before the </div> (of that
tabcontent-container div element), enter this code snippet:
<?php if (!empty($this->product->customfieldsSorted['related_products'])) { ?>
<div id="relatedProducts" class="flex-tabcontent" style="display:none;">
<?php echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true )); ?>
</div>
<?php } ?>
After you take care these code edits, you will have a "TAB" to show the related products.
For now, the layout will be whatever Virtuemart has in-stock. It might look little ugly. It requires some CSS edits to make the layout prettier. In the upcoming CleanMart version, we will take care the CSS edits (or maybe JS edits as well) and "Related Products" will look much better.
Regards