This is from product.product_form.php:
$tabs->startTab( $VM_LANG->_('PHPSHOP_RELATED_PRODUCTS'), "related-page");
?><br />
<h2><?php echo $VM_LANG->_('PHPSHOP_RELATED_PRODUCTS') ?></h2>
<br />
<table class="adminform">
<tr class="row1">
<td style="vertical-align:top;"><br />
<?php echo $VM_LANG->_('VM_PRODUCT_RELATED_SEARCH'); ?>
<input type="text" size="40" name="search" id="relatedProductSearch" value="" />
</td>
<td><input type="button" name="remove_related" onclick="removeSelectedOptions(relatedSelection);" value=" < " /></td>
<td>
<?php
$relProducts = array();
foreach( $related_products as $relProd ) {
$relProducts[$relProd] = $ps_product->get_field( $relProd, 'product_name');
}
echo ps_html::selectList('relProds', '', $relProducts, 10, 'multiple="multiple"', 'id="relatedSelection" ondblclick="removeSelectedOptions(relatedSelection);"');
?>
<input type="hidden" name="related_products" value="<?php echo implode('|', $related_products ) ?>" />
</td>
</tr>
</table>
<!-- Changed Product Type - Begin -->
<?php
$tabs->endTab();
And from ps_product.php:
if( !empty($d["related_products"])) {
/* Insert Pipe separated Related Product IDs */
$related_products = vmGet( $d, "related_products" );
$q = "INSERT INTO #__{vm}_product_relations ";
$q .= "(product_id, related_products) ";
$q .= "VALUES ('".$d["product_id"]."','".$db->getEscaped($related_products)."')";
$db->setQuery($q); $db->query();
}
So based on these 2 bits of code, it looks like the first removes related products, and the second actually inserts the related product information into the database, but that would be only after the proper data is selected.
I am still holding onto the fact that there is no such module/function listed in my copy of VM for "related products".
I'd really like for one of you all who has the related products working, to list your functions for the products module in the VM control panel.
Anyone else know where there might be some code related to related products? I could go through each PHP file, but ... ugh...
I'll do that if I see that someone who has related products working doesn't have a "related" function in their products module.
-Brian