Custom ubercart shipping cost calculator

Hello,

I need to set shipping cost as a function of product SKU’s and postcode. The cost will come from a static table of SKU v Postcode (multi item orders would be simply calculated by addition and a progressive discount per item).

Either way, if necesarry, it would be fairly trivial to construct a PHP function to return the cost. I’m just curious how I would glue that all together with ubercart and my webstore? Is there a module or method to do this within ubercart and drupal already?

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/22/feed