/** * Get registered label for product * * @param \XLite\Model\Product $product Product object * * @return array */ public static function getLabel(\XLite\Model\Product $product) { if (!isset(static::$labels[$product->getProductId()])) { static::$labels[$product->getProductId()] = $product->getFreeShip() ? static::getLabelContent() : ''; } return !empty(static::$labels[$product->getProductId()]) ? static::$labels[$product->getProductId()] : array(); }
/** * {@inheritDoc} */ public function getFreeShip() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFreeShip', array()); return parent::getFreeShip(); }