function is_available() { if ($this->_is_available === null) { $this->_is_available = true; $el = $this->element(); if ($el['ACTIVE'] == 'N') $this->_is_available = false; if ($this->quantity() == 0) $this->_is_available = false; } return $this->_is_available; }