public function getWeight()
    {
        $weight = 0;

        /* browse all products */
        foreach ($this->getOrderProducts() as $orderProduct) {
            $weight += $orderProduct->getQuantity() * (double)$orderProduct->getWeight();
        }

        return $weight;
    }
public function getWeight()
    {
        $weight = 0;

        /* browse all products */
        foreach ($this->getOrderProducts() as $orderProduct) {
            $weight += $orderProduct->getQuantity() * (double)$orderProduct->getWeight();
        }

        return $weight;
    }
public function getWeight ( ) { $ weight = 0 ; /* browse all products */ foreach ( $ this -> getOrderProducts ( ) as $ orderProduct ) { $ weight += $ orderProduct -> getQuantity ( ) * ( double ) $ orderProduct -> getWeight ( ) ; } return $ weight ; }
Compute this order weight.

The order weight is only available once the order is persisted in database.
During invoice process, use all cart methods instead of order methods (the order doest not exists at this moment)

@return float
@throws \Propel\Runtime\Exception\PropelException
Compute this order weight .