OK, got it, just quickly, I created a snippet "[!eForm_checkout!]" containing:
<?php
function checkout ( &$fields )
{
global $modx;
// Create cart summary - use Firefox development tools to figure out the being posted by the javascript cart (in caps for this eg)
$quantity_1=$fields['QUANTITY_1'];
$price_1=$fields['PRICE_1'];
$id_1=$fields['ID_1'];
$name_1=$fields['NAME_1'];
$addtlinfo_1= htmlentities($fields['ADDTLINFO_1']);
$quantity_2=$fields['QUANTITY_2'];
$price_2=$fields['PRICE_2'];
$id_2=$fields['ID_X'];
$name_2=$fields['NAME_2'];
$addtlinfo_2=htmlentities($fields['ADDTLINFO_2']);
//repeat for every possible item within cart limit
//Generate table
$strCartSummary.= "\n <tr> \n<td style=\"padding: 5px; border: 1px solid #769cc7;\">$quantity_1</td> \n<td style=\"padding: 5px; border: 1px solid #769cc7; text-align: left;\">$name_1 $id_1 $addtlinfo_1</td> \n<td style=\"padding: 5px; border: 1px solid #769cc7; text-align: right;\">\$$price_1</td> \n</tr> ";
if( $quantity_2 ) {$strCartSummary.= "<tr> \n<td style=\"padding: 5px; border: 1px solid #769cc7;\">$quantity_2</td> \n<td style=\"padding: 5px; border: 1px solid #769cc7; text-align: left;\">$name_2 $id_2 $addtlinfo_2</td> \n<td style=\"padding: 5px; border: 1px solid #769cc7; text-align: right;\">\$$price_2</td> \n</tr> \n";}
// if( $quantity_... repeat for every possible item in the cart
// Add this to the $fields array under the key 'cart-summary'...
$fields['cart-summary'] = $strCartSummary;
}
?>
On the checkout page the call looks something like this:
[!eForm_checkout!]
[!checkRequiredFields!]
[[validateEFormDate]]
[!eForm? &eFormOnValidate=`reqFields` &protectSubmit=`1` &eFormOnBeforeMailSent=`checkout` &formid=`payment_form` &to=`[email protected]` &fromname=`Merchant Name` &subject=`Order Confirmation: ((SUBTOTAL)) :: ((name)) :: ((client-order-number))` &jScript=`autofill_js` &automessage=`order_confirmation` &tpl=`payment_form` &report=`checkout_report` &from=`[email protected]` &gotoid=`32` &sendAsHtml=`1`!]
The javascript cart needs to be called within the eForm form "payment_form" so it’s processed by eForm with the the rest of the payment form.
Within the "order_confirmation" template chunk, amongst many other things, insert the "cart-summary" field like such:
<table style="font-size: 12px; border-collapse:collapse; border-spacing: 5px; border: 1px solid#769cc7; width: 100%;" border="0" cellpadding="0" cellspacing="0" >
<thead style="background-color:#ebf1fb; color: #769cc7;">
<tr>
<th style="padding: 5px; border-right: 1px #769cc7 solid;">Qty</th>
<th style="padding: 5px; border-right: 1px #769cc7 solid;">Product name</th>
<th>Price($AUD)</th>
</tr>
</thead>
<tbody>
[+cart-summary+]
<tr>
<td colspan="2" style="padding: 5px; border: 1px solid#769cc7; text-align: right;"><b>Subtotal:</b> </td>
<td style="padding: 5px; text-align: right; border: 1px solid#769cc7;">[+SUBTOTAL+]</td>
</tr>
<tr>
<td colspan="2" style="padding: 5px; border: 1px solid#769cc7; text-align: right;"><b>Delivery charges:</b></td>
<td style="padding: 5px; text-align: right; border: 1px solid#769cc7;">[+DELIVERY+]</td>
</tr>
<tr>
<td colspan="2" style="padding: 5px; border: 1px solid#769cc7; text-align: right;"><b>TOTAL: </b></td>
<td style="padding: 5px; text-align: right; border: 1px solid#769cc7;">[+TOTAL+]</td>
</tr>
</tbody>
</table>