public function __construct() { $this->settings = array('columns' => array('pages' => array('label' => 'Pages', 'options' => function () { $options = array(); /** @var Mage_Cms_Model_Resource_Page_Collection $magento_pages */ $magento_pages = Mage::getModel('cms/page')->getCollection()->addFieldToFilter('is_active', 1); $ids = $magento_pages->toOptionArray(); foreach ($ids as $id) { $options[$id['value']] = $id['value']; } return $options; }, 'rowMethod' => 'getPages', 'width' => 230)), 'buttonLabel' => 'Add Excluded Page', 'addAfter' => false); parent::__construct(); }
public function __construct() { $this->settings = array('columns' => array('attribute' => array('label' => 'Attribute', 'options' => function () { $options = array(); /** @var Algolia_Algoliasearch_Helper_Entity_Producthelper $product_helper */ $product_helper = Mage::helper('algoliasearch/entity_producthelper'); $attributes = $product_helper->getAllAttributes(); foreach ($attributes as $key => $label) { $options[$key] = $key ?: $label; } return $options; }, 'rowMethod' => 'getAttribute', 'width' => 160), 'sort' => array('label' => 'Sort', 'options' => array('asc' => 'Ascending', 'desc' => 'Descending'), 'rowMethod' => 'getSort'), 'label' => array('label' => 'Label', 'style' => 'width: 200px;')), 'buttonLabel' => 'Add Sorting Attribute', 'addAfter' => false); parent::__construct(); }
public function __construct() { $this->settings = array('columns' => array('attribute' => array('label' => 'Attribute', 'options' => function () { $options = array(); /** @var Algolia_Algoliasearch_Helper_Entity_Producthelper $product_helper */ $product_helper = Mage::helper('algoliasearch/entity_producthelper'); $searchableAttributes = $product_helper->getAllAttributes(); foreach ($searchableAttributes as $key => $label) { $options[$key] = $key ?: $label; } return $options; }, 'rowMethod' => 'getAttribute', 'width' => 160), 'searchable' => array('label' => 'Searchable', 'options' => array('1' => 'Yes', '0' => 'No'), 'rowMethod' => 'getSearchable'), 'retrievable' => array('label' => 'Retrievable', 'options' => array('1' => 'Yes', '0' => 'No'), 'rowMethod' => 'getRetrievable'), 'order' => array('label' => 'Ordered', 'options' => array('unordered' => 'Unordered', 'ordered' => 'Ordered'), 'rowMethod' => 'getOrder'), 'index_no_value' => array('label' => 'Index empty value', 'options' => array('1' => 'Yes', '0' => 'No'), 'rowMethod' => 'getIndexNoValue')), 'buttonLabel' => 'Add Attribute', 'addAfter' => false); parent::__construct(); }
public function __construct() { $this->settings = array('columns' => array('attribute' => array('label' => 'Attribute', 'options' => function () { $options = array(); /** @var Algolia_Algoliasearch_Helper_Entity_Producthelper $product_helper */ $product_helper = Mage::helper('algoliasearch/entity_producthelper'); $attributes = $product_helper->getAllAttributes(); foreach ($attributes as $key => $label) { $options[$key] = $key ?: $label; } return $options; }, 'rowMethod' => 'getAttribute', 'width' => 160), 'type' => array('label' => 'Facet type', 'options' => array('conjunctive' => 'Conjunctive', 'disjunctive' => 'Disjunctive', 'slider' => 'Slider', 'priceRanges' => 'Price Ranges'), 'rowMethod' => 'getType'), 'label' => array('label' => 'Label', 'style' => 'width: 100px;')), 'buttonLabel' => 'Add Facet', 'addAfter' => false); parent::__construct(); }
public function __construct() { $this->settings = array('columns' => array('attribute' => array('label' => 'Attribute', 'options' => function () { $options = array(); /** @var Algolia_Algoliasearch_Helper_Config $config */ $config = Mage::helper('algoliasearch/config'); $attributes = $config->getCategoryAdditionalAttributes(); foreach ($attributes as $attribute) { $options[$attribute['attribute']] = $attribute['attribute']; } $options['custom_attribute'] = '[use custom attribute]'; return $options; }, 'rowMethod' => 'getAttribute', 'width' => 150), 'custom_attribute' => array('label' => 'Custom attribute', 'style' => 'width: 120px;'), 'order' => array('label' => 'Asc / Desc', 'options' => array('desc' => 'Descending', 'asc' => 'Ascending'), 'rowMethod' => 'getOrder')), 'buttonLabel' => 'Add Ranking Criterion', 'addAfter' => false); parent::__construct(); }
public function __construct() { $this->settings = array('columns' => array('attribute' => array('label' => 'Attribute', 'options' => function () { $options = array(); /** @var Algolia_Algoliasearch_Helper_Entity_Producthelper $product_helper */ $product_helper = Mage::helper('algoliasearch/entity_producthelper'); $attributes = $product_helper->getAllAttributes(); foreach ($attributes as $key => $label) { $options[$key] = $key ?: $label; } $options['custom_attribute'] = '[use custom attribute]'; return $options; }, 'rowMethod' => 'getAttribute', 'width' => 150), 'custom_attribute' => array('label' => 'Custom attribute', 'style' => 'width: 120px;'), 'order' => array('label' => 'Asc / Desc', 'options' => array('desc' => 'Descending', 'asc' => 'Ascending'), 'rowMethod' => 'getOrder')), 'buttonLabel' => 'Add Ranking Criterion', 'addAfter' => false); parent::__construct(); }
public function __construct() { $this->settings = array('columns' => array('name' => array('label' => 'Section', 'options' => function () { $options = array(); $sections = array(array('name' => 'pages', 'label' => 'Pages')); /** @var Algolia_Algoliasearch_Helper_Config $config */ $config = Mage::helper('algoliasearch/config'); $attributes = $config->getFacets(); foreach ($attributes as $attribute) { if ($attribute['attribute'] == 'price' || $attribute['attribute'] == 'category' || $attribute['attribute'] == 'categories') { continue; } $sections[] = array('name' => $attribute['attribute'], 'label' => $attribute['label'] ? $attribute['label'] : $attribute['attribute']); } foreach ($sections as $section) { $options[$section['name']] = $section['label']; } return $options; }, 'rowMethod' => 'getName', 'width' => 130), 'label' => array('label' => 'Label', 'style' => 'width: 100px;'), 'hitsPerPage' => array('label' => 'Hits per page', 'style' => 'width: 100px;', 'class' => 'required-entry input-text validate-number')), 'buttonLabel' => 'Add Section', 'addAfter' => false); parent::__construct(); }
public function __construct() { $this->settings = array('columns' => array('synonyms' => array('label' => 'Synonyms (comma-separated)', 'style' => 'width: 550px;')), 'buttonLabel' => 'Add Synonyms', 'addAfter' => false); parent::__construct(); }