Beispiel #1
0
 /**
  * Get the "New!" label
  *
  * @param \XLite\Model\Product $product Current product
  *
  * @return array
  */
 public static function getLabels(\XLite\Model\Product $product)
 {
     $result = array();
     if ($product->isNewProduct() && \XLite\Core\Config::getInstance()->CDev->ProductAdvisor->na_mark_with_label) {
         $result[self::PA_MODULE_PRODUCT_LABEL_NEW] = \XLite\Core\Translation::getInstance()->translate('New!');
     }
     if ($product->isUpcomingProduct() && \XLite\Core\Config::getInstance()->CDev->ProductAdvisor->cs_mark_with_label) {
         $result[self::PA_MODULE_PRODUCT_LABEL_SOON] = \XLite\Core\Translation::getInstance()->translate('Coming soon');
     }
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function isUpcomingProduct()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'isUpcomingProduct', array());
     return parent::isUpcomingProduct();
 }