Esempio n. 1
0
 /**
  * Return net price of product
  *
  * @return float
  */
 protected function getNetPrice($value = null)
 {
     return $this->getProductVariant() ? $this->getProductVariant()->getDisplayPrice() : parent::getNetPrice($value);
 }
Esempio n. 2
0
 /**
  * Determine if we need to display product market price
  *
  * @return boolean
  */
 protected function isShowMarketPrice()
 {
     return !$this->getProduct()->getParticipateSale() && parent::isShowMarketPrice();
 }
Esempio n. 3
0
 /**
  * Return old price value
  *
  * @return float
  */
 protected function getOldPrice()
 {
     return $this->getProductVariant() ? $this->getProductVariant()->getDisplayPriceBeforeSale() : parent::getOldPrice();
 }
Esempio n. 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);
 }
Esempio n. 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));
 }
Esempio n. 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;
 }