private function addCategories() { $categories_names = []; foreach ($this->products_data as $product) { if ($product['category']) { $categories_names[] = $product['category']; } } $categories_names = array_unique($categories_names); $category_array = OrganizationsCategories::getKeyNameArray($categories_names, $this->organization); return $category_array; }