ProductOpener::TaxonomySuggestions - suggests taxonomy entries for dropdown, autocomplete etc.
Generate taxonomy suggestions with matched synonyms information.
Generate taxonomy suggestions (without matched synonyms information).
Hash of fields that can be taken into account to generate relevant suggestions
- country: derived from the cc parameter - categories: comma separated list of categories (tags ids or strings in the $search_lc language) - shape: packaging shape (tag id or string in the $search_lc language)
The results of this function are cached for 1 day using memcached. Restart memcached if you want fresh results (e.g. when taxonomy are category stats change).
Generate a sorted list of canonicalized taxonomy entries from which we will generate suggestions
Given a specific context (e.g. the product's country, categories, or the packaging component shape), we can generate popular suggestions sorted by popularity in this context.
Currently supports packaging_shapes and packaging_materials
For other taxonomy types, an empty list is returned.
Add packaging entries (shapes or materials) sorted by frequency for a specific country, category and shape (for materials)
Filter a list of potential taxonomy suggestions matching a string with matched synonyms information.
Filter a list of potential taxonomy suggestions matching a string (without matched synonyms information).
By priority, the function returns: - taxonomy entries that match the input string at the beginning - taxonomy entries that contain the input string - taxonomy entries that contain words contained in the input string (with other words between)
- limit: limit of number of results - format (not yet defined and implemented)
An array of suggestions hashes with the following fields: - tag: the tag to suggest - matched_synonym: the synonym that matched the input string