From a further quick look at the code it still means that a weight must be specified somewhere in order to trigger a shipping method.
See controllers/checkout.php where you have code like this:
$shipping = ( bccomp(@$this->cartData->weight,0,5)>0 ? true : false );
if($shipping){
$class = hikashop::get('class.shipping');
$methods =& $class->getShippings($this->cartData);
Could this be changed to something like:
$class = hikashop::get('class.shipping');
$methods =& $class->getShippings($this->cartData);
$shipping = !empty($methods);
if($shipping){
Taking the manual shipping plugin as an example the first line of
onShippingDisplay in
manual/manual.php could then be changed from:
function onShippingDisplay(&$order,&$dbrates,&$usable_rates,&$messages){
if(empty($dbrates)){
to:
function onShippingDisplay(&$order,&$dbrates,&$usable_rates,&$messages){
if (bccomp(@$order->weight,0,5)>0 ? false : true) {
return false;
}
if(empty($dbrates)){
This would maintain the existing behaviour while moving responsibility for the weight check into the shipping plug-in where it would be accessible to any developer writing a new shipping plug-in.
I notice this weight check occurs elsewhere in
controllers/checkout.php so there might be other ramifications of this suggestion which would need investigation.