Just in case anybody else ever comes across something like this, it is very doable, it's just not something built into eCart that you can do without going into code view.
First, I looped through eCart to gather up an array of all the different member ID's...
$MemberID = '';
$MembersCounter = 0;
$MembersArray = array();
while (!$eCart->EOF())
{
$CurrentMemberID = $eCart->DisplayInfo("MemberID");
// If ID is not in membersArray , then add it to array.
if (!in_array("$CurrentMemberID", $MembersArray))
array_push($MembersArray, $CurrentMemberID);
if($CurrentMemberID != $MemberID)
$MembersCounter++;
$MemberID = $CurrentMemberID;
$eCart->MoveNext();
}
$eCart->MoveFirst();
Then, I loop through that array to process each member ID. Within that loop I loop through eCart again to pick out the items where the member ID matches and tally up a subtotal for that seller. I load that amount into my own Authorize.net object and handle that stuff accordingly...
foreach($MembersArray as $ma){
$ma;
$subtotal = 0;
while (!$eCart->EOF())
{
if($eCart->DisplayInfo("MemberID") == $ma){
$subtotal += $eCart->DisplayInfo("Quantity")* $eCart->DisplayInfo("Price");
}
$eCart->MoveNext();
}
echo $total = number_format($subtotal, 2)."<br>";
$a->add_field('x_amount', $total);
// Process this total, then move to next.
// Process the payment and output the results
switch ($a->process()) {
case 1: // Successs
echo "<b>Success:</b><br>";
echo $a->get_response_reason_text();
echo "<br><br>Details of the transaction are shown below...<br><br>";
break;
case 2: // Declined
echo "<b>Payment Declined:</b><br>";
echo $a->get_response_reason_text();
echo "<br><br>Details of the transaction are shown below...<br><br>";
break;
case 3: // Error
echo "<b>Error with Transaction:</b><br>";
echo $a->get_response_reason_text();
echo "<br><br>Details of the transaction are shown below...<br><br>";
break;
}
I was hoping to avoid so many loops but this is working.