PriceIndexController
extends ProductController
in package
This controller describes the behavior of price index entities.
Use the controller to generate a collection of PriceIndexController entities.
Tags
Table of Contents
- TYPE_DISCONTINUED = 'discontinued'
- __construct() : mixed
- categoryController() : mixed
- categoryTitlePath() : string
- Returns the full category path to a category
- cleanupSpacing() : string
- Clean up white space in return content
- clearText() : string
- Helper function which strip tags and encodes html entities of string
- colorVariantTypeIds() : array<string|int, mixed>
- Returns the ids of any configured color variant type ids for the index
- deliveryTimeTitle() : string
- Returns the title of the delivery time of a product or variant
- filesController() : mixed
- frontPageId() : mixed
- getAdmarketingAttributes() : array<string|int, mixed>
- Fetch the saved attributes of an advertisement
- getDescription() : string
- Get the description (long) of the entity
- getDescriptionList() : string
- Get the description (list) of the entity
- getDescriptionShort() : string
- Get the description (short) of the entity
- getLimitLength() : mixed
- getPaymentOptions() : mixed
- Legacy, do not use this method
- getPrevNextProduct() : mixed
- getTranslation() : string
- Get translation data
- getUnitTitle() : string
- Get the title of a product entity
- getVariantCount() : int
- Returns the amount of variants for a specific product
- googleCategory() : int|null
- Returns the google category associated with a Product, if any
- hasMoreProducts() : bool
- Checks whether or not more products should be fetched and output
- ids() : array<string|int, mixed>
- Returns the ids of an array of objects
- indexExists() : bool
- Checks if the requested index exists
- isLastPage() : bool
- Returns whether or not the last page has been loaded
- itemLink() : string
- Returns a link to a product or variant
- languageLayerExists() : bool
- limitBuilder() : string
- Builds limit SQL fragment for query
- link() : string
- Get the qualified url of a product
- numberFormatClean() : string
- Number format with no decimal separator and no thousand point separator
- numberFormatDanish() : string
- Number format with a comma decimal separator and no thousand point separator
- numberFormatEnglish() : string
- Number format with a dot decimal separator and no thousand point separator
- params() : array<string|int, mixed>
- Returns the params set for this Controller
- picturePath() : string
- Returns the path (including domain) to a product or variant picture
- picturePaths() : mixed
- Assings the paths (including domain) to a products or variants pictures to a variable
- preload() : mixed
- preloadFilePath() : string
- Returns the path to the preload file, falling back to base index if the feed is custom
- setCharset() : void
- Helper function to override charset
- setEncodingFrom() : mixed
- Sets the encoding header to UTF-8 if a UTF-8 encoding tag is detected in the supplied template file
- setupForDeliveryEstimate() : mixed
- Sets up includes required for legacy delivery estimate function to work
- sizeVariantTypeIds() : array<string|int, mixed>
- Returns the ids of any configured size variant type ids for the index
- stockStatusText() : string
- Returns the stock status text of a product or variant
- toUTF8() : string
- Helper function which strips html tags, decodes html-characters and utf-8 encodes a string
- trimTo() : string
- Trim string to a maximum length, without cutting words
- uniqueLanguageExists() : bool
- variantDataController() : mixed
- variantTitle() : string
- Returns the full title of a product including both product and variant parts
- variantTypeIds() : array<string|int, int>
- Returns the distinct variant type ids for one or more product
Constants
TYPE_DISCONTINUED
public
mixed
TYPE_DISCONTINUED
= 'discontinued'
Tags
Methods
__construct()
public
__construct([mixed $parseUriParameters = false ]) :
mixed
Parameters
- $parseUriParameters : mixed = false
Tags
Return values
mixed —categoryController()
public
categoryController() :
mixed
Tags
Return values
mixed —categoryTitlePath()
Returns the full category path to a category
public
categoryTitlePath(array<string|int, mixed> $args) :
string
Parameters
- $args : array<string|int, mixed>
Tags
Return values
string —cleanupSpacing()
Clean up white space in return content
public
cleanupSpacing(string $contents[, bool $isJsonResponse = false ]) :
string
Parameters
- $contents : string
-
the stringified content
- $isJsonResponse : bool = false
-
are we reacting to a json response
Tags
Return values
string —content minified
clearText()
Helper function which strip tags and encodes html entities of string
public
clearText(string $text) :
string
Parameters
- $text : string
Tags
Return values
string —colorVariantTypeIds()
Returns the ids of any configured color variant type ids for the index
public
colorVariantTypeIds() :
array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —deliveryTimeTitle()
Returns the title of the delivery time of a product or variant
public
deliveryTimeTitle(array<string|int, mixed> $args) :
string
Parameters
- $args : array<string|int, mixed>
Tags
Return values
string —filesController()
public
filesController() :
mixed
Tags
Return values
mixed —frontPageId()
public
frontPageId() :
mixed
Tags
Return values
mixed —getAdmarketingAttributes()
Fetch the saved attributes of an advertisement
public
getAdmarketingAttributes(int $productId, string $index) :
array<string|int, mixed>
Parameters
- $productId : int
-
Unique ID of the product
- $index : string
-
Name of the index
Tags
Return values
array<string|int, mixed> —getDescription()
Get the description (long) of the entity
public
getDescription(mixed $Id[, mixed $LanguageIso = null ]) :
string
Parameters
- $Id : mixed
- $LanguageIso : mixed = null
Tags
Return values
string —getDescriptionList()
Get the description (list) of the entity
public
getDescriptionList(mixed $Id[, mixed $LanguageIso = null ]) :
string
Parameters
- $Id : mixed
- $LanguageIso : mixed = null
Tags
Return values
string —getDescriptionShort()
Get the description (short) of the entity
public
getDescriptionShort(mixed $Id[, mixed $LanguageIso = null ]) :
string
Parameters
- $Id : mixed
- $LanguageIso : mixed = null
Tags
Return values
string —getLimitLength()
public
getLimitLength() :
mixed
Tags
Return values
mixed —getPaymentOptions()
Legacy, do not use this method
public
getPaymentOptions(mixed $Price) :
mixed
Parameters
- $Price : mixed
Tags
Return values
mixed —getPrevNextProduct()
public
getPrevNextProduct(mixed $CurrentId) :
mixed
Parameters
- $CurrentId : mixed
Tags
Return values
mixed —getTranslation()
Get translation data
public
getTranslation(mixed $Id, mixed $Title[, mixed $LanguageIso = null ][, mixed $Module = 'product' ]) :
string
Parameters
- $Id : mixed
- $Title : mixed
- $LanguageIso : mixed = null
- $Module : mixed = 'product'
Tags
Return values
string —getUnitTitle()
Get the title of a product entity
public
getUnitTitle(mixed $UnitId[, mixed $LanguageIso = null ]) :
string
Parameters
- $UnitId : mixed
- $LanguageIso : mixed = null
Tags
Return values
string —getVariantCount()
Returns the amount of variants for a specific product
public
getVariantCount(int $productId) :
int
Parameters
- $productId : int
-
the id of the product
Tags
Return values
int —the amount of variants for the product
googleCategory()
Returns the google category associated with a Product, if any
public
googleCategory(mixed $productId) :
int|null
Parameters
- $productId : mixed
Tags
Return values
int|null —hasMoreProducts()
Checks whether or not more products should be fetched and output
public
hasMoreProducts([bool $isJsonResponse = false ]) :
bool
Parameters
- $isJsonResponse : bool = false
-
are we reacting to a json response
Tags
Return values
bool —ids()
Returns the ids of an array of objects
public
ids(array<string|int, mixed> $collectionObjects) :
array<string|int, mixed>
Parameters
- $collectionObjects : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —indexExists()
Checks if the requested index exists
public
indexExists() :
bool
Tags
Return values
bool —isLastPage()
Returns whether or not the last page has been loaded
public
isLastPage() :
bool
Tags
Return values
bool —itemLink()
Returns a link to a product or variant
public
itemLink(array<string|int, mixed> $args) :
string
Parameters
- $args : array<string|int, mixed>
Tags
Return values
string —languageLayerExists()
public
static
languageLayerExists(int $site, string $languageIso) :
bool
Parameters
- $site : int
- $languageIso : string
Tags
Return values
bool —limitBuilder()
Builds limit SQL fragment for query
public
limitBuilder(int $pageSize[, int $page = 1 ][, int $offset = 0 ]) :
string
Parameters
- $pageSize : int
- $page : int = 1
- $offset : int = 0
Tags
Return values
string —link()
Get the qualified url of a product
public
static
link(mixed $productId[, mixed $absolute = false ][, mixed $product = null ]) :
string
Parameters
- $productId : mixed
- $absolute : mixed = false
- $product : mixed = null
Tags
Return values
string —numberFormatClean()
Number format with no decimal separator and no thousand point separator
public
numberFormatClean(float $number) :
string
Parameters
- $number : float
Tags
Return values
string —numberFormatDanish()
Number format with a comma decimal separator and no thousand point separator
public
numberFormatDanish(float $number) :
string
Parameters
- $number : float
Tags
Return values
string —numberFormatEnglish()
Number format with a dot decimal separator and no thousand point separator
public
numberFormatEnglish(float $number) :
string
Parameters
- $number : float
Tags
Return values
string —params()
Returns the params set for this Controller
public
params() :
array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —picturePath()
Returns the path (including domain) to a product or variant picture
public
picturePath(array<string|int, mixed> $args) :
string
Parameters
- $args : array<string|int, mixed>
Tags
Return values
string —picturePaths()
Assings the paths (including domain) to a products or variants pictures to a variable
public
picturePaths(array<string|int, mixed> $args, Smarty_Internal_Template $template) :
mixed
Parameters
- $args : array<string|int, mixed>
- $template : Smarty_Internal_Template
Tags
Return values
mixed —preload()
public
preload(mixed $ids) :
mixed
Parameters
- $ids : mixed
Tags
Return values
mixed —preloadFilePath()
Returns the path to the preload file, falling back to base index if the feed is custom
public
preloadFilePath() :
string
Tags
Return values
string —setCharset()
Helper function to override charset
public
setCharset(array<string|int, mixed> $params) :
void
Parameters
- $params : array<string|int, mixed>
-
Params for function, supports "charset"
Tags
Return values
void —setEncodingFrom()
Sets the encoding header to UTF-8 if a UTF-8 encoding tag is detected in the supplied template file
public
setEncodingFrom(string $args) :
mixed
Parameters
- $args : string
-
an array of arguments
Tags
Return values
mixed —setupForDeliveryEstimate()
Sets up includes required for legacy delivery estimate function to work
public
setupForDeliveryEstimate() :
mixed
Tags
Return values
mixed —sizeVariantTypeIds()
Returns the ids of any configured size variant type ids for the index
public
sizeVariantTypeIds() :
array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —stockStatusText()
Returns the stock status text of a product or variant
public
stockStatusText(array<string|int, mixed> $args) :
string
Parameters
- $args : array<string|int, mixed>
Tags
Return values
string —toUTF8()
Helper function which strips html tags, decodes html-characters and utf-8 encodes a string
public
toUTF8(string $text[, bool $stripTags = true ]) :
string
Parameters
- $text : string
- $stripTags : bool = true
-
true to remove html from output
Tags
Return values
string —trimTo()
Trim string to a maximum length, without cutting words
public
trimTo(string $text, mixed $maxLength) :
string
Parameters
- $text : string
- $maxLength : mixed
Tags
Return values
string —uniqueLanguageExists()
public
static
uniqueLanguageExists(string $languageISo) :
bool
Parameters
- $languageISo : string
Tags
Return values
bool —variantDataController()
public
variantDataController() :
mixed
Tags
Return values
mixed —variantTitle()
Returns the full title of a product including both product and variant parts
public
variantTitle(array<string|int, mixed> $args) :
string
Parameters
- $args : array<string|int, mixed>
Tags
Return values
string —variantTypeIds()
Returns the distinct variant type ids for one or more product
public
variantTypeIds(mixed $productIds) :
array<string|int, int>
Parameters
- $productIds : mixed