public function getVolume(array $order, array &$cart)
    {
        $result = null;
        $this->hook->attach('order.volume.get.before', $order, $cart, $result, $this);

        if (isset($result)) {
            return (float) $result;
        }

        $total = 0.0;

        foreach ($cart['items'] as &$item) {
            $this->sumTotalVolume($total, $item, $order);
        }

        $result = round($total, 2);
        $this->hook->attach('order.volume.get.after', $order, $cart, $result, $this);
        return (float) $result;
    }
public function getVolume(array $order, array &$cart)
    {
        $result = null;
        $this->hook->attach('order.volume.get.before', $order, $cart, $result, $this);

        if (isset($result)) {
            return (float) $result;
        }

        $total = 0.0;

        foreach ($cart['items'] as &$item) {
            $this->sumTotalVolume($total, $item, $order);
        }

        $result = round($total, 2);
        $this->hook->attach('order.volume.get.after', $order, $cart, $result, $this);
        return (float) $result;
    }
public function getVolume ( array $ order , array & $ cart ) { $ result = null ; $ this -> hook -> attach ( 'order.volume.get.before' , $ order , $ cart , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( float ) $ result ; } $ total = 0.0 ; foreach ( $ cart [ 'items' ] as & $ item ) { $ this -> sumTotalVolume ( $ total , $ item , $ order ) ; } $ result = round ( $ total , 2 ) ; $ this -> hook -> attach ( 'order.volume.get.after' , $ order , $ cart , $ result , $ this ) ; return ( float ) $ result ; }
Returns a total volume of all products in the order
@param array $order
@param array $cart
@return float|null
Returns a total volume of all products in the order