/** * Define widget params * * @return void */ protected function defineWidgetParams() { parent::defineWidgetParams(); $this->widgetParams += array(static::PARAM_ATTRIBUTE => new \XLite\Model\WidgetParam\Object('Attribute', null, false, 'XLite\\Model\\Attribute'), static::PARAM_PRODUCT => new \XLite\Model\WidgetParam\Object('Product', null, false, 'XLite\\Model\\Product')); }
/** * Define widget parameters * * @return void */ protected function defineWidgetParams() { parent::defineWidgetParams(); $this->widgetParams += array(self::PARAM_FIELD_NAME => new \XLite\Model\WidgetParam\String('Name', 'amount'), self::PARAM_FIELD_TITLE => new \XLite\Model\WidgetParam\String('Title', 'Quantity'), self::PARAM_PRODUCT => new \XLite\Model\WidgetParam\Object('Product', null, false, '\\XLite\\Model\\Product'), self::PARAM_ORDER_ITEM => new \XLite\Model\WidgetParam\Object('Order item', null, false, '\\XLite\\Model\\OrderItem'), self::PARAM_FIELD_VALUE => new \XLite\Model\WidgetParam\Int('Value', null), self::PARAM_STYLE => new \XLite\Model\WidgetParam\String('CSS class', ''), self::PARAM_IS_CART_PAGE => new \XLite\Model\WidgetParam\Bool('Is cart page', false), self::PARAM_FORCE_VALUE => new \XLite\Model\WidgetParam\Bool('Force field value', false), self::PARAM_MAX_VALUE => new \XLite\Model\WidgetParam\Int('Max value', null)); }
/** * Check widget visibility * * @return boolean */ protected function isVisible() { return parent::isVisible() && $this->getProduct(); }
/** * getDir * * @return string */ protected function getDir() { return parent::getDir() . '/details'; }
/** * Define widget parameters * * @return void */ protected function defineWidgetParams() { parent::defineWidgetParams(); $this->widgetParams += array(self::PARAM_PRODUCT => new \XLite\Model\WidgetParam\Object('Product', null, false, '\\XLite\\Model\\Product')); }