Hi Jason
I'm still struggling with this
the steps i have taken are as follows
in my ecart object i have a colulmn called totalbottles which sums up how many bottles need to be shipped (the number of bottles per product is stored in my product table)
the cost of shipping 1 case is in a recordset that is filtered by the country code (in fact its the same table that stores all my countrys for the select list)
i have a function as described earlier that works out the shipping rate (i have checked this function and it does work as expected if i put in static values)
on my checkout page i have created a session variable to hold the returned value from my shippingcost function
to the function i pass the cost of shipping one case and the totalbottles amount
$bottleAmount = $eCart1->DisplayInfo("TotalBottles");
$shippingCost = $row_rs_saleparams['shipcost_scn'];
$shippingAmount = myshipping($bottleAmount, $shippingCost);
this i then store in a session variable
if (!session_id()) session_start();
if(isset($_POST["Checkout_x"])) {
$_SESSION["myShippingAmount"] = "".$shippingAmount ."";
}
when i get to the confirm page no shipping is displayed.
i'm not sure if i understand the flow of the checkout pages correctly
if the checkout form submits to confirm.php then i am guessing the session variable will not be set as the code is not on that page,
If i put the all the code to set the shipping on confirm.php then the session variable wont be avaliable to work out and display the shipping cost. (as it will need a page refresh to pick up the session variable)
if you could give me a detailed workflow of what to put where i would appreciate it.