Consent

Contracts

ConsentRepositoryContract

Repository to register consents and check for users response.

Namespace

Plenty\Modules\Webshop\Consent\Contracts

Methods

public registerConsentGroup(string $key, string $label, array $options = []):void

Register a new group of consents.

Parameters
string $key Unique identifier of the group
string $label Displayed label of the group
array $options Additional options of the group. Available options are: - necessary:boolean True if the group is necessary and could not be declined - description:string Description of the group. - position:number The position of the group
public registerConsent(string $key, string $label, array $options = []):void

Register a new consent.

Parameters
string $key Unique identifier of the consent.
string $label Displayed label of the consent.
array $options Additional options of the consent. Available options are: - necessary:boolean True of the consent is necessary and could not be declined - description:string Description of the consent - provider:string The provider of the cookie - lifespan:string Lifespan of the cookie - policyUrl:string URL to external privacy policy - group:string Identifier of an consent group - position:number The position of the consent in the group - isOptOut:boolean Select the consent by default. The user needs to decline the consent explicitly. - cookieNames:array Names of cookies which will be set. These cookies will not be blocked after the user confirmed the consent.
public getConsentGroups():Collection

Get all consent groups including all consents.

public hasResponse():bool

Check if the user has already responded the consents.

public setResponse(string $key, bool $isConsented = false):void

Set the response for a consent or a group of consents.

Parameters
string $key The key of the consent group and the consent, e.g. "group.consent" Use "*" as consent key to check if all entries of a group has a response, e.g. "group.*"
bool $isConsented True if the user has accepted the consent or the group of consents
public isConsented(string $key):bool

Check if the user has consented.

Parameters
string $key The key of the consent group and the consent, e.g. "group.consent" Use "*" as consent key to check if all entries of a group has a response, e.g. "group.*"

Webshop

Contracts

CheckoutRepositoryContract

Repository to get and set checkout data

Namespace

Plenty\Modules\Webshop\Contracts

Methods

public getCurrency():string
public setCurrency(string $currency):void
Parameters
string $currency
public getShippingCountryId():int

ContactRepositoryContract

Repository to get and set contact information for the webshop

Namespace

Plenty\Modules\Webshop\Contracts

Methods

public getContactId():int

Get the ID of the logged in contact or 0 for guests

public getContact():Contact

Get the logged in contact

public getContactClassId():int

Get the contact class ID of the logged in contact

public getContactClassData(int $contactClassId):array

Get the contact class data for the provided contact class ID

Parameters
int $contactClassId
public getDefaultContactClassId():int

Get the default contact class ID of the webstore

public showNetPrices():bool

Get Information if net prices should be shown

GiftCardRepositoryContract

Repository to get information about gift cards and corresponding order items

Namespace

Plenty\Modules\Webshop\Contracts

Methods

public hasGiftCardPdf(int $orderId, int $orderItemId, int $campaignCodeOrderId):bool

Checks if a gift card document has already been created for this order item

Parameters
int $orderId
int $orderItemId
int $campaignCodeOrderId
public getGiftCardInformation(int $orderItemId):array

Get Information about the gift card

Parameters
int $orderItemId
public isReturnable(int $orderItemId):bool

Return true if its not a gift card or the codes are not redeemed

Parameters
int $orderItemId
public getReturnQuantity(int $orderItemId):int

Returnable quantity for giftCard

Parameters
int $orderItemId

LocalizationRepositoryContract

Repository for webshop localization information

Namespace

Plenty\Modules\Webshop\Contracts

Methods

public getLanguage():string

Get the currently used language of the webshop visitor

public getLocale():string

Get the current locale

public getLanguageCode(string $countryCode = null):string

Get a language code Get a language code by given country code

Parameters
string $countryCode

SessionStorageRepositoryContract

Repository for webshop session information

Namespace

Plenty\Modules\Webshop\Contracts

Methods

public setSessionValue(string $key, $value):void

Set a value to a given key in the session

Parameters
string $key The key from session
$value The value will set to given key
public getSessionValue(string $key):void

Get a value from the session by a given key

Parameters
string $key The key to read from the session
public getCustomer():Customer

Get the customer session model

public getOrder():Order

Get the order session model

UrlBuilderRepositoryContract

Build urls

Namespace

Plenty\Modules\Webshop\Contracts

Methods

public buildItemUrl(int $itemId, string $lang = null):void

Build item url

Parameters
int $itemId
string $lang
public buildCategoryUrl(int $categoryId, string $lang = null, int $webstoreId = null):UrlQuery

Build category url

Parameters
int $categoryId
string $lang
int $webstoreId
public fillItemUrl(array $itemData):void

Fill item url

Parameters
array $itemData
public buildVariationUrl(int $itemId, int $variationId, string $lang = null):UrlQuery

Build variation url

Parameters
int $itemId
int $variationId
string $lang
public getSuffix(int $itemId, int $variationId, bool $withVariationId = true):string

Get suffix

Parameters
int $itemId
int $variationId
bool $withVariationId

WebstoreConfigurationRepositoryContract

Repository for webstore information

Namespace

Plenty\Modules\Webshop\Contracts

Methods

public getWebstoreConfiguration():WebstoreConfiguration

Get the webstore configuration

public getActiveLanguageList():array

Get the activate languages of the webstore

public getDefaultShippingCountryId():int

Get the default shipping-country-Id of the webstore

Events

AfterBasketItemToOrderItem

Event for receiving or manupulating the order item

Namespace

Plenty\Modules\Webshop\Events

Methods

public getOrderItem():array
public getBasketItem():array

ValidateVatNumber

ValidateVatNumberEvent

Namespace

Plenty\Modules\Webshop\Events

Methods

public getVatNumber():string

Helpers

PluginConfig

Helper for plugin config values

Namespace

Plenty\Modules\Webshop\Helpers

Methods

public load():void
public getPluginName():void
public getMultiSelectValue(string $key, array $possibleValues = [], array $default = []):void

Get Value from MultiSelect config

Parameters
string $key
array $possibleValues
array $default
public getTextValue(string $key, string $default = "", string $transformDefault = ""):void

Get value from input text config

Parameters
string $key
string $default
string $transformDefault
public getIntegerValue(string $key, int $default):void

Get value from integer config

Parameters
string $key
int $default
public getBooleanValue(string $key, bool $default = false):void
Parameters
string $key
bool $default
public getConfigValue(string $key, $default = null):void

Get config value

Parameters
string $key
$default

UnitUtils

UnitUtils

Namespace

Plenty\Modules\Webshop\Helpers

Methods

public static getHTML4Unit(string $unit = "SMM"):string

Returns HTML code for the unit ('m','cm' o'MM')

Parameters
string $unit

UrlQuery

Build URL queries

Namespace

Plenty\Modules\Webshop\Helpers

Methods

public static shouldAppendTrailingSlash():bool

Get information for trailing slash

public append(string $suffix):Helpers

Append given suffix to path

Parameters
string $suffix
public join(string $path):Helpers

Join a given path to path

Parameters
string $path
public toAbsoluteUrl(bool $includeLanguage = false):string

Return path as absolute url

Parameters
bool $includeLanguage
public toRelativeUrl(bool $includeLanguage = false):string

Return path as relative url

Parameters
bool $includeLanguage
public getPath(bool $includeLanguage = false):void

Return path

Parameters
bool $includeLanguage
public equals(string $path):bool

Compare path

Parameters
string $path

Hooks

CheckVatNumber

CheckVatNumber

Namespace

Plenty\Modules\Webshop\Hooks

Methods

public handle(ValidateVatNumber
 $vatNumberEvent):void

Validate the given vat number

Parameters
ValidateVatNumber $vatNumberEvent

ItemSearch

Contracts

FacetExtension

FacetExtension interface

Namespace

Plenty\Modules\Webshop\ItemSearch\Contracts

Methods

public getAggregation():AggregationInterface
public mergeIntoFacetsList($result):array
Parameters
$result
public extractFilterParams($filtersList):void
Parameters
$filtersList

Extensions

ItemSearchExtension

ItemSearchExtension interface, use to write own extensions

Namespace

Plenty\Modules\Webshop\ItemSearch\Extensions

Factories

BaseSearchFactory

BaseSearchFactory

Namespace

Plenty\Modules\Webshop\ItemSearch\Factories

Methods

public inherit(array $inheritedProperties = []):BaseSearchFactory

Create a new factory instance based on properties of an existing factory.

Parameters
array $inheritedProperties List of properties to inherit or null to inherit all properties.
public withMutator(MutatorInterface
 $mutator):Factories

Add a mutator

Parameters
MutatorInterface $mutator
public createFilter(string $filterClass, array $params = []):void

Add a filter. Will create a new instance of the filter class if not already created.

Parameters
string $filterClass
array $params
public withFilter(TypeInterface
 $filter):Factories

Add a filter. Will override existing filter instances.

Parameters
TypeInterface $filter
public withResultFields($fields):Factories

Set fields to be contained in search result.

Parameters
$fields Reference to a json file to load fields from or a list of field names.
public getResultFields():array
public withExtension(string $extensionClass, array $extensionParams = []):Factories

Add an extension.

Parameters
string $extensionClass Extension class to add.
array $extensionParams Additional parameters to pass to extensions constructor
public getExtensions():array

Get all registered extensions

public getMutators():array

Get all registered mutators

public withAggregation(AggregationInterface
 $aggregation):Factories

Add an aggregation

Parameters
AggregationInterface $aggregation
public withSuggestion(SuggestionInterface
 $suggestion):Factories

Add a suggestion

Parameters
SuggestionInterface $suggestion
public setPage(int $page, int $itemsPerPage):Factories

Set pagination parameters.

Parameters
int $page
int $itemsPerPage
public sortBy(string $field, string $order = \Plenty\Modules\Webshop\ItemSearch\Factories\VariationSearchFactory::SORTING_ORDER_DESC):Factories

Add sorting parameters

Parameters
string $field The field to order by
string $order Direction to order results. Possible values: 'asc' or 'desc'
public sortByMultiple(array $sortingList):Factories

Add multiple sorting parameters

Parameters
array $sortingList List of sorting parameters. Each entry should have a 'field' and an 'order' property.
public setOrder($idList):void
Parameters
$idList
public groupBy(string $field, array $sortings = []):Factories

Group results by field

Parameters
string $field The field to group properties by.
array $sortings List of sort criteria. Might contain string

FacetSearchFactory

FacetSearchFactory

Namespace

Plenty\Modules\Webshop\ItemSearch\Factories

Methods

public static create($facets):Factories

Create a factory instance depending on a given set of facet values.

Parameters
$facets List of active facet values. If string is given, it will be exploded by ',' to a list of values.
public withMinimumCount():Factories

Register extension to filter facets by minimum hit count.

public static default($options = []):void
Parameters
$options
public setAdminPreview(bool $isAdminPreview):Factories
Parameters
bool $isAdminPreview
public isActive():Factories

Filter active variations

public isInactive():Factories

Filter inactive variations

public hasItemId(int $itemId):Factories

Filter variation by a single item id

Parameters
int $itemId Item id to filter by.
public hasItemIds(array $itemIds):Factories

Filter variations by multiple item ids

Parameters
array $itemIds List of item ids to filter by.
public hasVariationId(int $variationId):Factories

Filter variation by a single variation id.

Parameters
int $variationId The variation id to filter by.
public hasVariationIds(array $variationIds):Factories

Filter variations by multiple variation ids.

Parameters
array $variationIds List of variation ids to filter by.
public hasAtLeastOneAvailability(array $availabilityIds):Factories

Filter variations by multiple availability ids.

Parameters
array $availabilityIds List of availability ids to filter by.
public hasSupplier(int $supplierId):Factories

Filter variations by multiple availability ids.

Parameters
int $supplierId The supplier id to filter by.
public hasManufacturer(int $manufacturerId):Factories

Filter manufacturers by id.

Parameters
int $manufacturerId To filter by manufacturer
public hasEachProperty(array $propertyIds):Factories

Filter variations by multiple property ids.

Parameters
array $propertyIds The property ids to filter by.
public isMain():Factories

Filter only main variations

public isChild():Factories

Filter only child variations

public isHiddenInCategoryList(bool $isHidden = true):Factories

Filter by visibility in category list.

Parameters
bool $isHidden Visibility in category list to filter by.
public isSalable():Factories

Filter variations by isSalable flag

public isVisibleForClient(int $clientId = null):Factories

Filter variations by visibility for client

Parameters
int $clientId The client id to filter by. If null, default client id from config will be used.
public hasNameInLanguage(string $type = "hasAnyNameInLanguage", string $lang = null):Factories

Filter variations having texts in a given language.

Parameters
string $type The text field to filter by ('hasAny', 'hasName1', 'hasName2', 'hasName3')
string $lang The language to filter by. If null, language defined in session will be used.
public isInCategory(int $categoryId):Factories

Filter variations contained in a category.

Parameters
int $categoryId A category id to filter variations by.
public hasAtLeastOnePrice(array $priceIds):Factories

Filter variations having at least on price.

Parameters
array $priceIds List of price ids to filter variations by
public hasPriceForCustomer():Factories

Filter variations having at least one price accessible by current customer.

public hasPriceInRange(float $priceMin, float $priceMax):Factories
Parameters
float $priceMin
float $priceMax
public hasTag(int $tagId):Factories
Parameters
int $tagId
public hasAnyTag(array $tagIds):Factories
Parameters
array $tagIds
public groupByTemplateConfig():Factories

Group results depending on a config value.

public isCrossSellingItem(int $itemId, string $relation):Factories

Filter variations having a cross selling relation to a given item.

Parameters
int $itemId Item id to filter cross selling items for
string $relation The relation of cross selling items.
public hasFacets($facetValues, int $clientId = null, string $lang = null):Factories

Filter variations by facets.

Parameters
$facetValues List of facet values. If string is given, it will be exploded by ';'
int $clientId Client id to filter facets by. If null, default client id from config will be used.
string $lang Language to filter facets by. If null, active language from session will be used.
public hasSearchString(string $query, string $lang = null, string $a = "", string $b = ""):Factories

Filter variations by given search string.

Parameters
string $query The search string to filter variations by
string $lang The language to apply search on. If null, default language from session will be used
string $a
string $b
public hasNameString(string $query, string $lang = null):Factories

Filter variations by searching names

Parameters
string $query The search string
string $lang Language to apply search on. If null, default language from session will be used.
public withLanguage(string $lang = null):Factories

Only request given language.

Parameters
string $lang Language to get texts for. If null, default language from session will be used.
public withImages(int $clientId = null):Factories

Include images in result

Parameters
int $clientId The client id to get images for. If null, default client id from config will be used.
public withVariationAttributeMap(int $itemId, int $initialVariationId, array $afterKey = []):Factories

Includes VariationAttributeMap for variation select

Parameters
int $itemId
int $initialVariationId
array $afterKey
public withPropertyGroups(array $displaySettings = []):Factories
Parameters
array $displaySettings
public withOrderPropertySelectionValues():Factories
public withVariationProperties():Factories
public withUrls():Factories

Append URLs to result.

public withPrices(array $quantities = [], bool $setPriceOnly = false):Factories

Append prices to result.

Parameters
array $quantities
bool $setPriceOnly
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():Factories
public withSetComponents():void
public withLinkToContent():Factories
public withGroupedAttributeValues():Factories
public withReducedResults():Factories
public withAvailability():Factories
public withTags():Factories
public withCategories():Factories
public withSuggestions(string $query = ""):Factories
Parameters
string $query
public withDidYouMeanSuggestions(string $query):Factories
Parameters
string $query
public withSalableVariationCount():VariationSearchFactory
public inherit(array $inheritedProperties = []):BaseSearchFactory

Create a new factory instance based on properties of an existing factory.

Parameters
array $inheritedProperties List of properties to inherit or null to inherit all properties.
public withMutator(MutatorInterface
 $mutator):Factories

Add a mutator

Parameters
MutatorInterface $mutator
public createFilter(string $filterClass, array $params = []):void

Add a filter. Will create a new instance of the filter class if not already created.

Parameters
string $filterClass
array $params
public withFilter(TypeInterface
 $filter):Factories

Add a filter. Will override existing filter instances.

Parameters
TypeInterface $filter
public withResultFields($fields):Factories

Set fields to be contained in search result.

Parameters
$fields Reference to a json file to load fields from or a list of field names.
public getResultFields():array
public withExtension(string $extensionClass, array $extensionParams = []):Factories

Add an extension.

Parameters
string $extensionClass Extension class to add.
array $extensionParams Additional parameters to pass to extensions constructor
public getExtensions():array

Get all registered extensions

public getMutators():array

Get all registered mutators

public withAggregation(AggregationInterface
 $aggregation):Factories

Add an aggregation

Parameters
AggregationInterface $aggregation
public withSuggestion(SuggestionInterface
 $suggestion):Factories

Add a suggestion

Parameters
SuggestionInterface $suggestion
public setPage(int $page, int $itemsPerPage):Factories

Set pagination parameters.

Parameters
int $page
int $itemsPerPage
public sortBy(string $field, string $order = \Plenty\Modules\Webshop\ItemSearch\Factories\VariationSearchFactory::SORTING_ORDER_DESC):Factories

Add sorting parameters

Parameters
string $field The field to order by
string $order Direction to order results. Possible values: 'asc' or 'desc'
public sortByMultiple(array $sortingList):Factories

Add multiple sorting parameters

Parameters
array $sortingList List of sorting parameters. Each entry should have a 'field' and an 'order' property.
public setOrder($idList):void
Parameters
$idList
public groupBy(string $field, array $sortings = []):Factories

Group results by field

Parameters
string $field The field to group properties by.
array $sortings List of sort criteria. Might contain string

VariationSearchFactory

VariationSearchFactory

Namespace

Plenty\Modules\Webshop\ItemSearch\Factories

Methods

public static default($options = []):void
Parameters
$options
public setAdminPreview(bool $isAdminPreview):Factories
Parameters
bool $isAdminPreview
public isActive():Factories

Filter active variations

public isInactive():Factories

Filter inactive variations

public hasItemId(int $itemId):Factories

Filter variation by a single item id

Parameters
int $itemId Item id to filter by.
public hasItemIds(array $itemIds):Factories

Filter variations by multiple item ids

Parameters
array $itemIds List of item ids to filter by.
public hasVariationId(int $variationId):Factories

Filter variation by a single variation id.

Parameters
int $variationId The variation id to filter by.
public hasVariationIds(array $variationIds):Factories

Filter variations by multiple variation ids.

Parameters
array $variationIds List of variation ids to filter by.
public hasAtLeastOneAvailability(array $availabilityIds):Factories

Filter variations by multiple availability ids.

Parameters
array $availabilityIds List of availability ids to filter by.
public hasSupplier(int $supplierId):Factories

Filter variations by multiple availability ids.

Parameters
int $supplierId The supplier id to filter by.
public hasManufacturer(int $manufacturerId):Factories

Filter manufacturers by id.

Parameters
int $manufacturerId To filter by manufacturer
public hasEachProperty(array $propertyIds):Factories

Filter variations by multiple property ids.

Parameters
array $propertyIds The property ids to filter by.
public isMain():Factories

Filter only main variations

public isChild():Factories

Filter only child variations

public isHiddenInCategoryList(bool $isHidden = true):Factories

Filter by visibility in category list.

Parameters
bool $isHidden Visibility in category list to filter by.
public isSalable():Factories

Filter variations by isSalable flag

public isVisibleForClient(int $clientId = null):Factories

Filter variations by visibility for client

Parameters
int $clientId The client id to filter by. If null, default client id from config will be used.
public hasNameInLanguage(string $type = "hasAnyNameInLanguage", string $lang = null):Factories

Filter variations having texts in a given language.

Parameters
string $type The text field to filter by ('hasAny', 'hasName1', 'hasName2', 'hasName3')
string $lang The language to filter by. If null, language defined in session will be used.
public isInCategory(int $categoryId):Factories

Filter variations contained in a category.

Parameters
int $categoryId A category id to filter variations by.
public hasAtLeastOnePrice(array $priceIds):Factories

Filter variations having at least on price.

Parameters
array $priceIds List of price ids to filter variations by
public hasPriceForCustomer():Factories

Filter variations having at least one price accessible by current customer.

public hasPriceInRange(float $priceMin, float $priceMax):Factories
Parameters
float $priceMin
float $priceMax
public hasTag(int $tagId):Factories
Parameters
int $tagId
public hasAnyTag(array $tagIds):Factories
Parameters
array $tagIds
public groupByTemplateConfig():Factories

Group results depending on a config value.

public isCrossSellingItem(int $itemId, string $relation):Factories

Filter variations having a cross selling relation to a given item.

Parameters
int $itemId Item id to filter cross selling items for
string $relation The relation of cross selling items.
public hasFacets($facetValues, int $clientId = null, string $lang = null):Factories

Filter variations by facets.

Parameters
$facetValues List of facet values. If string is given, it will be exploded by ';'
int $clientId Client id to filter facets by. If null, default client id from config will be used.
string $lang Language to filter facets by. If null, active language from session will be used.
public hasSearchString(string $query, string $lang = null, string $a = "", string $b = ""):Factories

Filter variations by given search string.

Parameters
string $query The search string to filter variations by
string $lang The language to apply search on. If null, default language from session will be used
string $a
string $b
public hasNameString(string $query, string $lang = null):Factories

Filter variations by searching names

Parameters
string $query The search string
string $lang Language to apply search on. If null, default language from session will be used.
public withLanguage(string $lang = null):Factories

Only request given language.

Parameters
string $lang Language to get texts for. If null, default language from session will be used.
public withImages(int $clientId = null):Factories

Include images in result

Parameters
int $clientId The client id to get images for. If null, default client id from config will be used.
public withVariationAttributeMap(int $itemId, int $initialVariationId, array $afterKey = []):Factories

Includes VariationAttributeMap for variation select

Parameters
int $itemId
int $initialVariationId
array $afterKey
public withPropertyGroups(array $displaySettings = []):Factories
Parameters
array $displaySettings
public withOrderPropertySelectionValues():Factories
public withVariationProperties():Factories
public withUrls():Factories

Append URLs to result.

public withPrices(array $quantities = [], bool $setPriceOnly = false):Factories

Append prices to result.

Parameters
array $quantities
bool $setPriceOnly
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():Factories
public withSetComponents():void
public withLinkToContent():Factories
public withGroupedAttributeValues():Factories
public withReducedResults():Factories
public withAvailability():Factories
public withTags():Factories
public withCategories():Factories
public withSuggestions(string $query = ""):Factories
Parameters
string $query
public withDidYouMeanSuggestions(string $query):Factories
Parameters
string $query
public withSalableVariationCount():VariationSearchFactory
public inherit(array $inheritedProperties = []):BaseSearchFactory

Create a new factory instance based on properties of an existing factory.

Parameters
array $inheritedProperties List of properties to inherit or null to inherit all properties.
public withMutator(MutatorInterface
 $mutator):Factories

Add a mutator

Parameters
MutatorInterface $mutator
public createFilter(string $filterClass, array $params = []):void

Add a filter. Will create a new instance of the filter class if not already created.

Parameters
string $filterClass
array $params
public withFilter(TypeInterface
 $filter):Factories

Add a filter. Will override existing filter instances.

Parameters
TypeInterface $filter
public withResultFields($fields):Factories

Set fields to be contained in search result.

Parameters
$fields Reference to a json file to load fields from or a list of field names.
public getResultFields():array
public withExtension(string $extensionClass, array $extensionParams = []):Factories

Add an extension.

Parameters
string $extensionClass Extension class to add.
array $extensionParams Additional parameters to pass to extensions constructor
public getExtensions():array

Get all registered extensions

public getMutators():array

Get all registered mutators

public withAggregation(AggregationInterface
 $aggregation):Factories

Add an aggregation

Parameters
AggregationInterface $aggregation
public withSuggestion(SuggestionInterface
 $suggestion):Factories

Add a suggestion

Parameters
SuggestionInterface $suggestion
public setPage(int $page, int $itemsPerPage):Factories

Set pagination parameters.

Parameters
int $page
int $itemsPerPage
public sortBy(string $field, string $order = \Plenty\Modules\Webshop\ItemSearch\Factories\VariationSearchFactory::SORTING_ORDER_DESC):Factories

Add sorting parameters

Parameters
string $field The field to order by
string $order Direction to order results. Possible values: 'asc' or 'desc'
public sortByMultiple(array $sortingList):Factories

Add multiple sorting parameters

Parameters
array $sortingList List of sorting parameters. Each entry should have a 'field' and an 'order' property.
public setOrder($idList):void
Parameters
$idList
public groupBy(string $field, array $sortings = []):Factories

Group results by field

Parameters
string $field The field to group properties by.
array $sortings List of sort criteria. Might contain string

Helpers

FacetExtensionContainer

FacetExtensionContainer

Namespace

Plenty\Modules\Webshop\ItemSearch\Helpers

Methods

public getFacetExtensions():array
public addFacetExtension(FacetExtension
 $facetExtension):void
Parameters
FacetExtension $facetExtension

ResultFieldTemplate

ResultFieldTemplate

Namespace

Plenty\Modules\Webshop\ItemSearch\Helpers

Methods

public static get(string $template):string

Get the path to result fields file from template/ theme

Parameters
string $template Event to be emitted to templates/ themes
public static load($template):void
Parameters
$template
public setTemplate(string $event, string $template, bool $overwriteExistingData = true):void

Set the path of a template to read result fields from.

Parameters
string $event The event to set the template for.
string $template Path to the template to read result fields from.
bool $overwriteExistingData Option to overwrite existing data
public setTemplates(array $templateMap, bool $overwriteExistingData = true):void

Set multiple templates to read result fields from.

Parameters
array $templateMap
bool $overwriteExistingData
public requireFields($event, $field = null):void

Add required fields to variation search requests.

Parameters
$event A single template event to set required fields for or a map between template events and list of required fields
$field If first parameter describes a single template event this parameter may contain a single result field or a list of field to require.

SortingHelper

Sorting Helper

Namespace

Plenty\Modules\Webshop\ItemSearch\Helpers

Methods

public getSorting(string $sortingConfig = null, bool $isCategory = true):array

Get sorting values from plugin configuration

Parameters
string $sortingConfig The configuration value from plugin
bool $isCategory Get default sorting configuration for category or for search
public getCategorySorting(string $sortingConfig = null):array

Get sorting values for categories from config

Parameters
string $sortingConfig The configuration value
public getSearchSorting(string $sortingConfig = null):array

Get sorting values for searches from config

Parameters
string $sortingConfig The configuration value
public getUsedItemName():string
public splitPathAndOrder($sorting):void
Parameters
$sorting
public mapToInnerSorting($sorting):void
Parameters
$sorting
public static isLanguageSupported(string $lang):bool
Parameters
string $lang
public static isLanguageActivated(string $lang):bool
Parameters
string $lang
public static getM10lByLanguage(string $lang, string $fallback = "en"):string
Parameters
string $lang
string $fallback
public static getLanguageByM10l(string $lang, string $fallback = "english"):string
Parameters
string $lang
string $fallback

SearchPresets

BasketItems

BasketItem preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

CategoryItems

CategoryItem preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

CrossSellingItems

CrossSellingItems preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

Facets

Facet preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

LiveShoppingItems

LiveShoppingItems preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

ManufacturerItems

ManufacturerItems preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

SearchItems

SearchItems preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

SearchPreset

SearchPreset interface

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory(array $options):void

Get the search factory from the preset.

Parameters
array $options

SearchSuggestions

SearchSuggestions preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

SingleItem

SingleItem preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

TagItems

TagItems preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

VariationAttributeMap

VariationAttributeMap preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

VariationList

VariationList preset

Namespace

Plenty\Modules\Webshop\ItemSearch\SearchPresets

Methods

public static getSearchFactory($options):void
Parameters
$options

Services

ItemSearchService

Execute VDI requests

Namespace

Plenty\Modules\Webshop\ItemSearch\Services

Methods

public getResults(array $searches):array

Get search results for multiple search requests.

Parameters
array $searches Map of search factories to execute.
public getResult(BaseSearchFactory
 $searchFactory):array

Get result of a single search factory;

Parameters
BaseSearchFactory $searchFactory The factory to get results for.

Order

Contracts

OrderRepositoryContract

Create orders from the webshop

Namespace

Plenty\Modules\Webshop\Order\Contracts

Methods

public placeOrder():Order
public createReturnOrder(array $returnOrderData):Order
Parameters
array $returnOrderData

Seo

Contracts

RobotsRepositoryContract

Repository for robots.txt

Namespace

Plenty\Modules\Webshop\Seo\Contracts

Methods

public findByWebstoreId(int $webstoreId):Robots
Parameters
int $webstoreId
public updateByWebstoreId(int $webstoreId, string $data):Robots
Parameters
int $webstoreId
string $data

SitemapConfigurationRepositoryContract

Repository for sitemap configuration

Namespace

Plenty\Modules\Webshop\Seo\Contracts

Methods

public findByWebstoreId(int $webstoreId):SitemapConfiguration
Parameters
int $webstoreId
public updateByWebstoreId(int $webstoreId, array $data = []):SitemapConfiguration
Parameters
int $webstoreId
array $data

Models

Robots

The robots model

Namespace

Plenty\Modules\Webshop\Seo\Models

Properties

Type Name Description
string value

Methods

public toArray()

Returns this model as an array.

SitemapConfiguration

The sitemap configuration model

Namespace

Plenty\Modules\Webshop\Seo\Models

Properties

Type Name Description
int contentCategory
int itemCategory
int item
int blog

Methods

public toArray()

Returns this model as an array.

Template

Contracts

TemplateConfigRepositoryContract

Register plugin config values for usage in core

Namespace

Plenty\Modules\Webshop\Template\Contracts

Methods

public registerConfigValue(string $key, $value):TemplateConfigRepositoryContract
Parameters
string $key
$value

Providers

TemplateServiceProvider

Service provider for template plugins

Namespace

Plenty\Modules\Webshop\Template\Providers

Methods

public overrideTemplate(string $original, string $override):void

Override a twig template. The new template will be used when the overridden template is going to be rendered.

Parameters
string $original
string $override
public addTemplateAlias(string $original, string $alias):void

Add an alias for a template. Rendering the template will also check for overrides of the alias template.

Parameters
string $original
string $alias