/** * Define and set handler attributes; initialize handler * * @param array $params Handler params OPTIONAL * * @return void */ public function __construct(array $params = array()) { parent::__construct(); if (!in_array('product_variant', $this->relatedTargets['product_list'])) { $this->relatedTargets['product_list'][] = 'product_variant'; } }
/** * Returns the list of related targets * * @param string $target Target name * * @return array */ public function getRelatedTargets($target) { $targets = parent::getRelatedTargets($target); if ('payment_settings' == $target) { $targets[] = 'moneybookers_settings'; } return $targets; }
/** * Returns the list of related targets * * @param string $target Target name * * @return array */ public function getRelatedTargets($target) { $targets = parent::getRelatedTargets($target); if ('profile_list' == $target) { $targets[] = 'saved_cards'; } return $targets; }
/** * Returns the list of related targets * * @param string $target Target name * * @return array */ public function getRelatedTargets($target) { $targets = parent::getRelatedTargets($target); if ('shipping_methods' == $target) { $targets[] = 'usps'; } return $targets; }
/** * Define and set handler attributes; initialize handler * * @param array $params Handler params OPTIONAL * * @return void */ public function __construct(array $params = array()) { parent::__construct(); if (!in_array('sales_tax', $this->relatedTargets['tax_classes'])) { $this->relatedTargets['tax_classes'][] = 'sales_tax'; $this->relatedTargets['sales_tax'] = $this->relatedTargets['tax_classes']; $this->relatedTargets['sales_tax'][] = 'tax_classes'; } }
/** * Returns the list of related targets * * @param string $target Target name * * @return array */ public function getRelatedTargets($target) { $result = parent::getRelatedTargets($target); if ('payment_settings' === $target) { $result[] = 'paypal_settings'; $result[] = 'paypal_credit'; } return $result; }
/** * Initialize handler * * @return void */ public function init() { parent::init(); $this->relatedTargets['product'][] = 'upselling_products'; }
/** * Initialize handler * * @return void */ public function init() { parent::init(); $this->relatedTargets[\XLite\Core\Request::getInstance()->id ? 'categories' : 'front_page'][] = 'featured_products'; }
/** * Register JS files * * @return array */ public function getJSFiles() { $list = parent::getJSFiles(); $list[] = $this->getDir() . '/controller.js'; return $list; }
/** * Get cache parameters * * @return array */ protected function getCacheParameters() { $params = parent::getCacheParameters(); $key = array(); /** @var \XLite\View\Menu\Admin\LeftMenu\ANodeNotification $item */ foreach ($this->getItems() as $item) { $key[] = $item->getCacheParameters(); } $params[] = md5(serialize($key)); return $params; }