Lyle,
I still need a little help trying to implement a custom shipping quote error message. Using the documentation, I was able to find a reference to this and used the following to return a error message from my hook_quote:
<?php
return array(
'01' => array(
'error' => 'This order contains a shipment that is too large for our standard LTL freight quote. Please call us at [727] 319-2300 so we can arrange for the best possible freight quote for you.'
),
);
?>This works find except that the error message says "UNDEFINED" before it (see screenshot). I thought it might be related to the accessorial in the hook_shipping_method, so I added that in as follow:
<?php
$methods = array();
$enabled = variable_get('uc_quote_enabled', array('freight' => true));
$weight = variable_get('uc_quote_method_weight', array('freight' => 0));
$methods['freight'] = array(
'id' => 'freight',
'title' => t('Freight'),
'module' => 'uc_freight_shipping',
'enabled' => $enabled['freight'],
'weight' => $weight['freight'],
'quote' => array(
'type' => 'freight',
'callback' => 'freight_quote',
'accessorials' => array(
'01' => t('Freight'),
),
),
);
return $methods;
}
?>...but the problem persists. Am I missing something, or is this a bug?
Thanks for your help!
| Attachment | Size |
|---|---|
| shipping_quote_error.jpg | 61.5 KB |
