/** * Return net price of product * * @return float */ protected function getNetPrice($value = null) { return $this->getProductVariant() ? $this->getProductVariant()->getDisplayPrice() : parent::getNetPrice($value); }
/** * 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(); }
/** * Format modifier price * * @param float $value Value * * @return string */ public static function formatModifierPrice($value) { return \XLite\View\Price::getInstance()->formatPrice($value, null, true); }
/** * Define widget parameters * * @return void */ protected function defineWidgetParams() { parent::defineWidgetParams(); $this->widgetParams += array(static::PARAM_QUANTITY => new \XLite\Model\WidgetParam\Int('Product quantity', 1)); }
/** * 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; }