Example #1
0
 /**
  * Return net price of product
  *
  * @return float
  */
 protected function getNetPrice($value = null)
 {
     return $this->getProductVariant() ? $this->getProductVariant()->getDisplayPrice() : parent::getNetPrice($value);
 }
Example #2
0
 /**
  * Determine if we need to display product market price
  *
  * @return boolean
  */
 protected function isShowMarketPrice()
 {
     return !$this->getProduct()->getParticipateSale() && parent::isShowMarketPrice();
 }
 /**
  * Return old price value
  *
  * @return float
  */
 protected function getOldPrice()
 {
     return $this->getProductVariant() ? $this->getProductVariant()->getDisplayPriceBeforeSale() : parent::getOldPrice();
 }
Example #4
0
 /**
  * Format modifier price
  *
  * @param float $value Value
  *
  * @return string
  */
 public static function formatModifierPrice($value)
 {
     return \XLite\View\Price::getInstance()->formatPrice($value, null, true);
 }
Example #5
0
 /**
  * Define widget parameters
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams += array(static::PARAM_QUANTITY => new \XLite\Model\WidgetParam\Int('Product quantity', 1));
 }
Example #6
0
 /**
  * Return the specific label info
  *
  * @param string $labelName
  *
  * @return array
  */
 protected function getLabel($labelName)
 {
     if (static::SALE_PRICE_LABEL === $labelName) {
         $result = $this->getSalePriceLabel();
     } else {
         $result = parent::getLabel($labelName);
     }
     return $result;
 }