protected function sumTotalWeight(&$total, array &$item, array $order)
    {
        $product = &$item['product'];

        if ($product['weight_unit'] !== $order['weight_unit']) {

            try {
                $product['weight'] = $this->convertor->convert($product['weight'], $product['weight_unit'], $order['weight_unit']);
            } catch (Exception $ex) {
                return null;
            }

            $product['weight_unit'] = $order['weight_unit'];
        }

        $total += (float) ($product['weight'] * $item['quantity']);
        return null;
    }
protected function sumTotalWeight(&$total, array &$item, array $order)
    {
        $product = &$item['product'];

        if ($product['weight_unit'] !== $order['weight_unit']) {

            try {
                $product['weight'] = $this->convertor->convert($product['weight'], $product['weight_unit'], $order['weight_unit']);
            } catch (Exception $ex) {
                return null;
            }

            $product['weight_unit'] = $order['weight_unit'];
        }

        $total += (float) ($product['weight'] * $item['quantity']);
        return null;
    }
protected function sumTotalWeight ( & $ total , array & $ item , array $ order ) { $ product = & $ item [ 'product' ] ; if ( $ product [ 'weight_unit' ] !== $ order [ 'weight_unit' ] ) { try { $ product [ 'weight' ] = $ this -> convertor -> convert ( $ product [ 'weight' ] , $ product [ 'weight_unit' ] , $ order [ 'weight_unit' ] ) ; } catch ( Exception $ ex ) { return null ; } $ product [ 'weight_unit' ] = $ order [ 'weight_unit' ] ; } $ total += ( float ) ( $ product [ 'weight' ] * $ item [ 'quantity' ] ) ; return null ; }
Sum weight totals
@param float $total
@param array $item
@param array $order
@return null
Sum weight totals