/** * Return the specific sale price label info * * @return array */ protected function getSalePriceLabel() { if (!isset($this->salePriceLabel)) { if ($this->participateSale()) { $label = static::t('percent X off', array('percent' => $this->getSalePercent())); $this->salePriceLabel = array('green sale-price' => $label); \XLite\Module\CDev\Sale\Core\Labels::addLabel($this->getProduct(), $this->salePriceLabel); } } return $this->salePriceLabel; }
/** * Return product labels * * @param \XLite\Model\Product $product The product to look for * * @return array */ protected function getLabels(\XLite\Model\Product $product) { return parent::getLabels($product) + \XLite\Module\CDev\Sale\Core\Labels::getLabel($product); }