VariationSearchFactory
Concrete factory to build variation searches
Namespace
IO\Services\ItemSearch\Factories
Extends
Type | Name | Value | Description |
---|---|---|---|
|
'asc' |
||
|
'desc' |
||
|
'aggregations' |
||
|
'collapse' |
||
|
'extensions' |
||
|
'filters' |
||
|
'mutators' |
||
|
'pagination' |
||
|
'resultFields' |
||
|
'sorting' |
Type | Name | Description |
---|---|---|
|
Methods
public __construct()
public isActive():Factories
Filter active variations
public isInactive():Factories
Filter inactive variations
public hasItemId($itemId):Factories
Filter variation by a single item id
Type |
Name |
Description |
|
Item id to filter by. |
public hasItemIds($itemIds):Factories
Filter variations by multiple item ids
Type |
Name |
Description |
|
List of item ids to filter by. |
public hasVariationId($variationId):Factories
Filter variation by a single variation id.
Type |
Name |
Description |
|
The variation id to filter by. |
public hasVariationIds($variationIds):Factories
Filter variations by multiple variation ids.
Type |
Name |
Description |
|
List of variation ids to filter by. |
public hasAtLeastOneAvailability($availabilityIds):Factories
Filter variations by multiple availability ids.
Type |
Name |
Description |
|
List of availability ids to filter by. |
public hasSupplier($supplierId):Factories
Filter variations by multiple availability ids.
Type |
Name |
Description |
|
The supplier id to filter by. |
public hasManufacturer($manufacturerId):Factories
Filter manufacturers by id.
Type |
Name |
Description |
|
To filter by manufacturer |
public hasEachProperty($propertyIds):Factories
Filter variations by multiple property ids.
Type |
Name |
Description |
|
The property ids to filter by. |
public isMain():Factories
Filter only main variations
public isChild():Factories
Filter only child variations
Filter by visibility in category list.
Type |
Name |
Description |
|
Visibility in category list to filter by. |
public isSalable():Factories
Filter variations by isSalable flag
public isVisibleForClient($clientId = null):Factories
Filter variations by visibility for client
Type |
Name |
Description |
|
The client id to filter by. If null, default client id on application will be used. |
public hasNameInLanguage($type = \Plenty\Modules\Item\Search\Filter\TextFilter::FILTER_ANY_NAME, $lang = null):Factories
Filter variations having texts in a given language.
Type |
Name |
Description |
|
The text field to filter by ('hasAny', 'hasName1', 'hasName2', 'hasName3') |
|
|
The language to filter by. If null, language defined in session will be used. |
public isInCategory($categoryId):Factories
Filter variations contained in a category.
Type |
Name |
Description |
|
A category id to filter variations by. |
public hasAtLeastOnePrice($priceIds):Factories
Filter variations having at least on price.
Type |
Name |
Description |
|
List of price ids to filter variations by |
public hasPriceForCustomer():Factories
Filter variations having at least one price accessible by current customer.
public hasPriceInRange()
public hasTag($tagId)
Type |
Name |
Description |
|
public hasAnyTag($tagIds)
Type |
Name |
Description |
|
public groupByTemplateConfig($key = "ids.itemAttributeValue"):Factories
Group results depending on a config value.
Type |
Name |
Description |
|
public isCrossSellingItem($itemId, $relation):Factories
Filter variations having a cross selling relation to a given item.
Type |
Name |
Description |
|
Item id to filter cross selling items for |
|
|
The relation of cross selling items. |
public hasFacets($facetValues, $clientId = null, $lang = null):Factories
Filter variations by facets.
Type |
Name |
Description |
|
List of facet values. If string is given, it will be exploded by ';' |
|
|
Client id to filter facets by. If null, default client id from application will be used. |
|
|
Language to filter facets by. If null, active language from session will be used. |
public hasSearchString($query, $lang = null, $searchType = \Plenty\Modules\Cloud\ElasticSearch\Lib\ElasticSearch::SEARCH_TYPE_EXACT, $operator = \Plenty\Modules\Cloud\ElasticSearch\Lib\ElasticSearch::OR_OPERATOR):Factories
Filter variations by given search string.
Type |
Name |
Description |
|
The search string to filter variations by |
|
|
The language to apply search on. If null, default language from session will be used |
|
|
Type of the search ('exact', 'fuzzy', 'autocomplete') |
|
|
Operator ot be used for search |
public hasNameString($query, $lang = null):Factories
Filter variations by searching names
Type |
Name |
Description |
|
The search string |
|
|
Language to apply search on. If null, default language from session will be used. |
public withLanguage($lang = null):Factories
Only request given language.
Type |
Name |
Description |
|
Language to get texts for. If null, default language from session will be used. |
public withImages($clientId = null):Factories
Include images in result
Type |
Name |
Description |
|
The client id to get images for. If null, default client id from application will be used. |
public withAttributes():Factories
Includes VariatonAttributeMap for variation select
public withPropertyGroups()
public withOrderPropertySelectionValues()
public withVariationProperties()
public withUrls():Factories
Append URLs to result.
public withPrices($params):Factories
Append prices to result.
Type |
Name |
Description |
|
Params to be passed to price search. |
public withCurrentCategory():Factories
Set result as current category
public withDefaultImage():Factories
Append default item image if images are requested by result fields and item does not have any image
public withBundleComponents()
public withLinkToContent()
public withGroupedAttributeValues()
public withReducedResults($removeProperties = false)
Type |
Name |
Description |
|
public withAvailability()