예제 #1
0
파일: Price.php 프로젝트: kewaunited/xcart
 /**
  * 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;
 }
예제 #2
0
 /**
  * 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);
 }