The order is stored correctly in the database. Also when I define a default value for the variables, the line for each item is returned in the test for the recordset.
Just as a test I replaced the php code with the recordset values, and on the checkout success page the lines for the different items display correctly. Only on the email confirmation they don't.
I am not set on using the values from the database, if the php code is OK to use, unless there are reliability issues with the php code ( echo $name->DisplayInfo("Name");. Would the php code be just as well?
If not, do you need to look at email page only, or also at the checkout success page?