ian,
the problem is in the constructor of the class. if we look at the beginning part of it, there is an early exit if there is no sort order:
PHP Code:
function __construct() {
$this->code = 'ukpost';
$this->title = MODULE_SHIPPING_UKPOST_TEXT_TITLE;
$this->description = MODULE_SHIPPING_UKPOST_TEXT_DESCRIPTION;
$this->sort_order = defined('MODULE_SHIPPING_UKPOST_SORT_ORDER') ? MODULE_SHIPPING_UKPOST_SORT_ORDER : null;
if (null === $this->sort_order) return false;
the num_zones does not get set until the end of the constructor.
why mike did it this way, i do not know.
you can either comment out the early return or move the assignment of the num_zones above it. as in:
PHP Code:
//from
if (null === $this->sort_order) return false;
//to:
//if (null === $this->sort_order) return false;
//or to:
$this->num_zones = 4;
if (null === $this->sort_order) return false;
best.
Bookmarks