Our OSCommerce site uses a contribution to assign an individual delivery charge to each product, this is stored in the database against the product.
Currently the delivery cost is calculated by adding all of these individual charges together. What we want is to charge the customer ONLY the maximum item cost for delivery.
For example, 2 items are ordered, 1 with delivery for ?5.00 and 1 with delivery for ?10.00. Instead of charging the customer ?15.00 we only want to charge them ?10.00.
We are not sure of how to implement this, perhaps creating an array and adding the individual delivery cost to the array each time the product is added to the basket, and removing it if the product is removed, and then calling the maximum value for the array.