/** * Return current product class for further adding to cart * * @return \XLite\Model\Product */ protected function getCurrentProduct() { if (null === $this->product) { $this->product = \XLite\Core\Database::getRepo('XLite\\Model\\Product')->find($this->getCurrentProductId()); } return $this->product && $this->product->isAvailable() ? $this->product : null; }
/** * {@inheritDoc} */ public function isAvailable() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'isAvailable', array()); return parent::isAvailable(); }