getSupplier ( string search , boolean _isCloserSearch , boolean _returnList ) : int_or_array
Returns the corresponding supplier ID in all registered in the cache list. You must refresh this cache everytime you add a new element on your site. Else the list will be obsolete.
Use activeFlexibleComparaison to ignore for example accent differences in the search.
See also
updateSuppliersactiveFlexibleComparaison
Parameters
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 something. In IA algorithm compare textual similarities and return the closer element ID.
• if true, it returns everytime something. 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.