Below, I've attached my "flatrate.inc" which seems to correctly
calculate a linear regression along the lines of
cost= flatrate+ priceperpound * weight
for a four zone a US-centric scheme.
It's easy to read and modify and has the advantage that the zones do
not have to be contiguous in a pulldown&select scheme.
However, there is a problem that I cannot find an answer to.
Edits to the coefficients of this file (living in
modules/ecommerce/contrib/shipcalc/partners ) do not reliably update-
the checkout procedure either calculates based on the old coeffs or
"crashes" with a blank white screen.
Can someone explain (or point to the explanation) of how this code
interacts with the rest of shipcalc and what installation steps are
required to ensure the right version is being used ?
Thanks,
D
<?php
function flatrate_shipping_methods($type = 'domestic') {
// TODO: Add descriptions of various shipping methods.
$methods = array();
$methods['flatrate'] = array( '#title' => t('flatrate'), '#description' => t('Weight Based Shipping.'), );
switch ($type) {
case 'domestic':
default:
$methods['flatrate']['Flat Rate & Weight Based'] = array(
'#title' => t('Flat Rate & Weight Based'),
);
break;
case 'international':
$methods['flatrate']['Flat Rate & Weight Based'] = array(
'#title' => t('Flat Rate & Weight Based International'),