$subTotal, 'totalWeight'=> $totalWeight, 'basket' => array( 'city' => $basket['delInf']['town'], 'state' => $basket['delInf']['county'], 'postcode' => $basket['delInf']['postcode'], 'country' => getCountryFormat($basket['delInf']['country']), ), ); $cpost = new Canada_Post($module, $postageArray); $i = 0; if (is_array($cpost->request())) { foreach ($cpost->request() as $method) { $method['price'] = $method['price'] + $method['handling']; $out[$i]['value'] = $method['price']; # Shipping value out e.g. 4.34 $out[$i]['desc'] = priceFormat($method['price'], true)." ".$method['name']; # Formatted price to show on cart page $out[$i]['method'] = "Canada Post (".$method['name'].") ".priceFormat($module['level'], true); // Description of shipping method e.g. Canada Post (Air Mail) $3.25 ## depending on how the store is configured tax can either be calculated now or later with the id taxRate() will bring back a value based on ID $out[$i]['taxId'] = $module['tax']; // Tax ID number used by cart.inc.php to work out tax on shipping later $out[$i]['taxAmount']= $taxVal; // Tax amount as an amount $i++; } return $out; } } return false; } $shipArray[] = Canada_Post(); ?>