this is a tough one because of the requirement of using the highest shipping rate as the base.
you are on the right track with creating the Shipping column and the Flat rate calculation.
to complete this we will need to create code that will determine which is the highest shipping rate and store it in a session variable.
On the cart display page, add the following code just before the doctype tag to do this:
<?php
@session_start();
$_SESSION['highestShipping'] = "0";
while (!$eCart2->EOF()) {
if($eCart2->DisplayInfo("Shipping") > $_SESSION['highestShipping']) $_SESSION['highestShipping'] = $eCart2->DisplayInfo("Shipping");
$eCart2->MoveNext();
}
$eCart2->MoveFirst();
?>
this code is using an eCart object named "eCart2" if your eCart object uses a different name, the code will need to be adjusted accordingly.
Next, we will need to create 2 shipping rules:
1) Base shipping:
Trigger:
"Subtotal For Any Column"
If the subtotal of column "Quantity" is ">" a value of "0"
Calculation:
"Falt rate"
$_SESSION['highestShipping']
2) Incremental shipping:
Trigger:
"Subtotal For Any Column"
If the subtotal of column "Quantity" is ">" a value of "1"
Calculation:
"Falt rate"
($this->TotalColumn("FlatRate") - $_SESSION['highestShipping']) * 0.5