getAttribute ( int combination_id , string search , boolean _isCloserSearch , boolean _returnList ) : int_or_array
Returns the corresponding attribute ID in all registred in the cache list. You must refresh this cache everytime you add an new element on your site. Else the list will be obsolete.
Use activeFlexibleComparaison to ignore for example accent differences in the search.
See also
updateCombinationsactiveFlexibleComparaison
Parameters
combination_id
Combination ID of possible attributes
search
what you search in the list.
_isCloserSearch (optional)
• if false (default), the function return the corresponding ID if there is an exact matching and null else
• if true, it returns everytime someting. In IA algorithm compare textual similarities and return the closer element ID.
• if true, it returns everytime someting. In IA algorithm compare textual similarities and return the closer element ID.
_returnList (optional)
• if false (default), it return an ID
• if true, it returns a list of ID. So if isCloserSearch=false, it returns all element with a name equals to the search. If isCloserSearch=true, it returns all the list ordered by proximity.
• if true, it returns a list of ID. So if isCloserSearch=false, it returns all element with a name equals to the search. If isCloserSearch=true, it returns all the list ordered by proximity.