public function calculateItemsTotal()
    {
        $itemsTotal = 0;

        foreach ($this->items as $item) {
            $itemsTotal += $item->getTotal();
        }

        $this->itemsTotal = $itemsTotal;

        return $this;
    }
public function calculateItemsTotal()
    {
        $itemsTotal = 0;

        foreach ($this->items as $item) {
            $itemsTotal += $item->getTotal();
        }

        $this->itemsTotal = $itemsTotal;

        return $this;
    }
public function calculateItemsTotal ( ) { $ itemsTotal = 0 ; foreach ( $ this -> items as $ item ) { $ itemsTotal += $ item -> getTotal ( ) ; } $ this -> itemsTotal = $ itemsTotal ; return $ this ; }
Calculate the total price for all the items

@return $this
Calculate the total price for all the items