public function getItemCount() { $total = 0; foreach ($this->items as $i) { $total += $i->quantity; } return $total; }