you would need to create a database table to contain each of these charges.
the table should contain only one record with a column for each charge set one column to hold the amount of the flat rate, set the other column to hold the percentage amount as a decimal, i.e. "0.10" for %10.
on the cart page, create a recordset to return the record from this table.
Go to the Server behaviors panel and click the plus button. select eCart -> General -> Set Session Value. set the trigger to "If session Variable is not defined", give the session a unique name like "FlatRate", click the lightning bolt next to value and select the flat rate column from the recordset.
Repeat this step for the percentage column to store the database values in the session variables.
In the eCart object, you can create the charges t use the session variables.
use the triggers:
Session Variable Exists:
Session Variable name "FlatRate"
Total number of unique items > 0
for the calculation use flat rate and enter:
for the percentage rule, use based on the cart subtotal:
subtotal "Times" "$_SESSION['percentage']
make sure to use the same names for the session variables as you use when setting them in the set session value behavior.