So to make a relation between products :
You (already?) make/made a TV in the ’product’ template ..
You make it the type of TV you want for instance : a listbox / multiple or a list of checkboxes ...
What you do then is put something like this in the "Input Option Values: "
@EVAL return($modx->runSnippet(’Ditto’, array(’parents’=>’79’, ’depth’=>’1’, ’tpl’=>’@CODE:[+longtitle+]==[+id+]||’, ’tplLast’=>’@CODE:[+longtitle+]==[+id+]’, ’display’=>’all’, ’sortBy’=>’pagetitle’, ’sortDir’=>’ASC’)));
So this will list all documents (products) under ID 79 and render it in the for checkboxes/ multiple select lists required format :
option1==value1||option2==value2||option3==value3
http://svn.modxcms.com/docs/display/MODx096/Creating+a+Template+Variable
This way the list you can pick from is always up to date ...
Also (this is important for showing the related products!) you should select the right widget for this TV : it is ’delimeted list’ and the delimiter value the "," ...
On the product page in the ’related products’ box you would call [[Ditto? &documents=`[*relatedProdTV*]`]]
due to the widget [*relatedProdTV*] contains something like 85,98,103 which is exactly the documents parameter for the ditto call takes in ..
Good luck !