I'm getting this debug error:
PHP Warning: Invalid argument supplied for foreach()
and it points to this in usps.php
PHP Code:
//Get value of package - used for insurance and cod.
$value=0;
foreach ($order->products as $p) {
$value+=$p['final_price']*$p['qty'];
}
$this->_setValue($value);
Any ideas?
I found this one interesting! It looks like this only crops up when using shipping estimator while no one is logged in!
PHP Code:
//line 276 - usps.php
//Get value of package if this isn't an estimate - used for insurance and cod.
if (isset($order->products)) {
foreach ($order->products as $p) {
$value+=$p['final_price']*$p['qty'];
}
} else { //shipping estimator requested a quote and user isn't logged in - so estimate!
$value=$_SESSION['cart']->show_total(); //Shipping estimator constructs an artificial $order object without a products array when a user isn't logged in.
}
$this->_setValue($value);
So try that code - and if all is good I'll create another update.