public function getCriterionsGroupsValue($id_lang) { $criterions_groups = array(); $attributes_groups = AdvancedSearchClass::getAttributesGroups($id_lang); foreach ($attributes_groups as $row) { $criterions_groups[] = array('id' => $row['id_attribute_group'], 'name' => $row['public_name'], 'type' => 'attribute'); } $features = AdvancedSearchClass::getFeatures($id_lang); foreach ($features as $row) { $criterions_groups[] = array('id' => $row['id_feature'], 'name' => $row['name'], 'type' => 'feature'); } $criterions_groups[] = array('id' => 0, 'name' => $this->l('Manufacturer'), 'type' => 'manufacturer'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('Supplier'), 'type' => 'supplier'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('All category levels'), 'type' => 'category'); $categories_level_depth = AdvancedSearchClass::getCategoriesLevelDepth(); foreach ($categories_level_depth as $category_level_depth) { $criterions_groups[] = array('id' => $category_level_depth['level_depth'], 'name' => $this->l('Categories level') . ' ' . $category_level_depth['level_depth'], 'type' => 'category'); } $criterions_groups[] = array('id' => 0, 'name' => $this->l('Price'), 'type' => 'price'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('On sale'), 'type' => 'on_sale'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('In stock'), 'type' => 'stock'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('Available for order'), 'type' => 'available_for_order'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('Only online'), 'type' => 'online_only'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('Condition'), 'type' => 'condition'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('Width'), 'type' => 'width'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('Height'), 'type' => 'height'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('Depth'), 'type' => 'depth'); $criterions_groups[] = array('id' => 0, 'name' => $this->l('Weight'), 'type' => 'weight'); if (version_compare(_PS_VERSION_, '1.5.0.0', '>=')) { $ap5ModuleInstance = Module::getInstanceByName('pm_advancedpack'); if (Validate::isLoadedObject($ap5ModuleInstance)) { $criterions_groups[] = array('id' => 0, 'name' => $this->l('Pack'), 'type' => 'pack'); } } return $criterions_groups; }