Пример #1
0
 /**
  * Return 'Out of stock' message
  *
  * @return string
  */
 protected function getOutOfStockMessage()
 {
     return $this->getProduct()->mustHaveVariants() ? static::t($this->getProductVariant() ? 'This item is out of stock' : 'This item is not available') : parent::getOutOfStockMessage();
 }
Пример #2
0
 /**
  * Check widget visibility
  *
  * @return boolean
  */
 protected function isVisible()
 {
     return parent::isVisible() && !$this->getProduct()->isUpcomingProduct();
 }