How might I, in a snippet inserted into a Ditto list template, add the value of a TV from the current document to that of the listed document?
Let’s say the tv I want to sum is called [*tvPrice*].
I’m thinking the Ditto tpl would be something like:
Current Item plus [+pagetitle+] price: [[SumTVs? &tv=`tvPrice` &docs=`[*id*],[+id+]`]]
Where:
- [[SumTVs]] is the snippet containing php code to add the two TVs together
- tvPrice is the tv we want to draw data from
- [*id*] is the current document id
- [+id+] is the listed document id
Apparently the math can be done via a fairly straightforward mySql statement but I’m not sure how to begin. I haven’t created a snippet before and know very little php

I’m willing to give it a go if anyone is willing to give me some tips on how to get started. I guess it could be quite a useful little snippet for product bundling, etc
As always, thanks in advance for your help!
Luke