GXEngineProduct

Implements \ProductInterface

Class GXEngineProduct

category

System

package

Product

subpackage

Entities

Methods

GXEngineProduct constructor.

__construct(\ProductSettingsInterface $settings) 

Arguments

$settings

\ProductSettingsInterface

Product settings.

Add Addon Values

addAddonValues(\KeyValueCollection $keyValueCollection) : \GXEngineProduct

Adds a key value collection to a product.

Arguments

$keyValueCollection

\KeyValueCollection

The key value collection to add.

Response

\GXEngineProduct

Same instance for chained method calls.

Delete Addon Value

deleteAddonValue(\StringType $key) : \GXEngineProduct

Deletes an addon value of a product.

Throws
\InvalidArgumentException

if the key is not valid.

Arguments

$key

\StringType

The key of the addon value to delete.

Response

\GXEngineProduct

Same instance for chained method calls.

Get Added Date Time

getAddedDateTime() : \DateTime

Returns the added date time of the product.

Response

\DateTime

The added date time.

Returns a product's additional images.

getAdditionalImages() : \ProductImageCollection

Get Addon Value

getAddonValue(\StringType $key) : string

Returns the addon value of a product, depending on the provided key.

Throws
\InvalidArgumentException

if the key is not valid.

Arguments

$key

\StringType

The key of the addon value to return.

Response

string

The addon value.

Get Addon Values

getAddonValues() : \KeyValueCollection

Returns a key value collection of the product.

Response

\KeyValueCollection

The key value collection.

Get Available Date Time

getAvailableDateTime() : \DateTime

Returns the available date time of the product.

Response

\DateTime

The available date time.

Get Checkout Information

getCheckoutInformation(\LanguageCode $language) : string

Returns the checkout information of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the checkout information to be return.

Response

string

The checkout information of the product.

Get Description

getDescription(\LanguageCode $language) : string

Returns the description of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the description to return.

Response

string

The description of the product.

Get Discount Allowed

getDiscountAllowed() : float

Returns the allowed discount.

Response

float

The allowed discount.

Get EAN

getEan() : string

Returns the EAN of the product.

Response

string

The EAN of the product.

Returns the image container of the product.

getImageContainer() : \ProductImageContainer

Response

\ProductImageContainer

Product image container.

Get Info Url

getInfoUrl(\LanguageCode $language) : string

Returns the URL for further information of the product (e.g. manufacturer homepage), depending on the provided language code.

Arguments

$language

\LanguageCode

The language code of the URL to return.

Response

string

Product's Manufacturer URL

Get Keywords

getKeywords(\LanguageCode $language) : string

Returns the keywords of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the keywords to return.

Response

string

The keywords of the product.

Get Last Modified Date Time

getLastModifiedDateTime() : \DateTime

Returns the last modified date time.

Response

\DateTime

The last modified date time.

Get Manufacturer ID

getManufacturerId() : integer

Returns the manufacturer ID.

Response

integer

The manufacturer ID.

Get Meta Description

getMetaDescription(\LanguageCode $language) : string

Returns the meta description of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the meta description to return.

Response

string

The meta description of the product.

Get Meta Keywords

getMetaKeywords(\LanguageCode $language) : string

Returns the meta keywords of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the meta keywords to return.

Response

string

The meta keywords of the product.

Get Meta Title

getMetaTitle(\LanguageCode $language) : string

Returns the meta title of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the meta title to return.

Response

string

The meta title of the product.

Get Name

getName(\LanguageCode $language) : string

Returns the name of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the name to return.

Response

string

The name of the product.

Get Ordered Count

getOrderedCount() : integer

Returns the ordered count of the product.

Response

integer

The ordered count.

Get Price

getPrice() : float

Returns the price of a product.

Response

float

The price of the product.

Returns the product's primary image.

getPrimaryImage() : \ProductImage

Response

\ProductImage

Get Product Model

getProductModel() : string

Returns the product model.

Response

string

The product model.

Get Product Type ID.

getProductTypeId() : integer

Returns the product type ID.

Response

integer

The product type ID.

Get Quantity

getQuantity() : float

Returns the quantity of the product.

Response

float

The quantity of the product.

Get Quantity Unit ID

getQuantityUnitId() : integer

Returns the quantity unit ID.

Response

integer

The quantity unit ID.

Get Product Settings.

getSettings() : \ProductSettingsInterface

Returns the product settings.

Response

\ProductSettingsInterface

Get Shipping Costs

getShippingCosts() : float

Returns the shipping cost of the product.

Response

float

The shipping costs of the product.

Get Shipping Time ID

getShippingTimeId() : integer

Returns the shipping time ID of the product.

Response

integer

The shipping time ID.

Get Short Description

getShortDescription(\LanguageCode $language) : string

Returns the short description of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the short description to return.

Response

string

The short description of the product.

Get Sort Order

getSortOrder() : integer

Returns an integer which represents a specific sort order.

Response

integer

The sort order.

Returns the Special offer id.

getSpecialOfferId() : integer

Response

integer

The special offer id.

Get Tax Class ID

getTaxClassId() : integer

Returns the tax class ID of the product.

Response

integer

The tax class ID.

Get Info Url

getUrl(\LanguageCode $language) : string

Returns the URL for further information of the product (e.g. manufacturer homepage), depending on the provided language code.

deprecated

Use ::getInfoUrl() instead. Will be removed in GX3.11.

Arguments

$language

\LanguageCode

The language code of the URL to return.

Response

string

Product's Manufacturer URL

Get URL Keywords

getUrlKeywords(\LanguageCode $language) : string

Returns the URL keywords of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the URL keywords to be return.

Response

string

The URL keywords of the product.

Get URL rewrite

getUrlRewrite(\LanguageCode $language) : \UrlRewrite

Returns the URL rewrite of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the URL rewrite to be return.

Response

\UrlRewrite

The URL rewrite of the product.

Get URL rewrites

getUrlRewrites() : \UrlRewriteCollection

Returns the URL rewrites of the product.

Response

\UrlRewriteCollection

The URL rewrites of the product.

Get View Count

getViewedCount(\LanguageCode $language) : integer

Returns the current view count of the product, depending on the provided language code.

Throws
\InvalidArgumentException

if the language code is not valid.

Arguments

$language

\LanguageCode

The language code of the language to be returned.

Response

integer

The current view count.

Get VPE ID.

getVpeId() : integer

Returns the VPE ID.

Response

integer

VPE ID.

Get VPE Value

getVpeValue() : float

Returns the VPE value.

Response

float

The VPE value.

Get Weight

getWeight() : float

Returns the weight of the product.

Response

float

The weight of the product.

Is Active

isActive() : boolean

Checks if a product is active.

Response

boolean

Product status.

Is FSK 18

isFsk18() : boolean

Checks if the product is only available for FSK 18.

Response

boolean

Is the product FSK18?

Is VPE Active

isVpeActive() : boolean

Checks if VPE is active on the product.

Response

boolean

Is VPE active on the product?

Set Active

setActive(\BoolType $status) : \GXEngineProduct

Activates or deactivates a product status.

Arguments

$status

\BoolType

The status to activate or deactivate the product.

Response

\GXEngineProduct

Same instance for chained method calls.

Sets the added date time.

setAddedDateTime(\DateTime $date) : \GXEngineProduct

Arguments

$date

\DateTime

Added date time.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Addon Value

setAddonValue(\StringType $key, \StringType $value) : \GXEngineProduct

Sets the addon value of a product.

Arguments

$key

\StringType

The key for the addon value.

$value

\StringType

The value for the addon.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Available Date Time

setAvailableDateTime(\DateTime $date) : \GXEngineProduct

Sets an available date time.

Arguments

$date

\DateTime

The date time to add.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Checkout Information

setCheckoutInformation(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the checkout information of a product.

Arguments

$text

\StringType

The checkout information.

$language

\LanguageCode

The language code for the checkout information.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Description

setDescription(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the products description.

Arguments

$text

\StringType

The description.

$language

\LanguageCode

The language code for the description.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Discount Allowed

setDiscountAllowed(\DecimalType $discount) : \GXEngineProduct

Sets the allowed discount of a product.

Arguments

$discount

\DecimalType

The discount to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set EAN

setEan(\StringType $ean) : \GXEngineProduct

Sets a EAN for the product.

Arguments

$ean

\StringType

The EAN to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set FSK 18

setFsk18(\BoolType $status) : \GXEngineProduct

Activates or deactivates FSK18 for a product.

Arguments

$status

\BoolType

Should FSK be activated?

Response

\GXEngineProduct

Same instance for chained method calls.

Set Image Container

setImageContainer(\ProductImageContainerInterface $images) : \GXEngineProduct

Sets the image container of a product.

Arguments

$images

\ProductImageContainerInterface

Product image container to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Product's Info URL

setInfoUrl(\StringType $url, \LanguageCode $language) : \GXEngineProduct

Sets the product's info URL (e.g. homepage of the manufacturer).

Arguments

$url

\StringType

The URL.

$language

\LanguageCode

The language code.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Keywords

setKeywords(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the products keywords.

Arguments

$text

\StringType

The keywords.

$language

\LanguageCode

The language code for the keywords.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Last Modified Date Time

setLastModifiedDateTime(\DateTime $date) : \GXEngineProduct

Sets the last modified date time.

Arguments

$date

\DateTime

The last modified date time.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Manufacturer ID

setManufacturerId(\IdType $id) : \GXEngineProduct

Sets the manufacturer ID of a product.

Arguments

$id

\IdType

The manufacturer ID to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Meta description.

setMetaDescription(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the meta description of a product.

Arguments

$text

\StringType

Meta description to set.

$language

\LanguageCode

Language code for the meta description.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Meta Keywords

setMetaKeywords(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the products meta keywords.

Arguments

$text

\StringType

The meta keywords.

$language

\LanguageCode

The language code for the meta keywords.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Meta title.

setMetaTitle(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the meta title of a product.

Arguments

$text

\StringType

Meta title to set.

$language

\LanguageCode

Language code of the meta title.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Name

setName(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the products name.

Arguments

$text

\StringType

The name of the product.

$language

\LanguageCode

The language code for the product name.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Ordered Count

setOrderedCount(\IntType $count) : \GXEngineProduct

Sets the ordered count.

Arguments

$count

\IntType

The ordered count.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Price

setPrice(\DecimalType $price) : \GXEngineProduct

Sets a price of the product.

Arguments

$price

\DecimalType

The price to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Product Model

setProductModel(\StringType $model) : \GXEngineProduct

Set the product model.

Arguments

$model

\StringType

The product model.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Product Type ID.

setProductTypeId(\IdType $id) : \GXEngineProduct

Sets the product type ID of the product.

Arguments

$id

\IdType

Product type ID.

Response

\GXEngineProduct

Set Quantity

setQuantity(\DecimalType $quantity) : \GXEngineProduct

Sets a quantity for the product.

Arguments

$quantity

\DecimalType

The quantity to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Quantity Uniz ID

setQuantityUnitId(\IdType $id) : \ProductInterface

Sets the quantity unit ID of a product.

Arguments

$id

\IdType

The quantity unit ID to set.

Response

\ProductInterface

Same instance for chained method calls.

Sets a product setting object

setSettings(\ProductSettingsInterface $productSettings) : \GXEngineProduct

Arguments

$productSettings

\ProductSettingsInterface

The settings of the product.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Shipping Costs

setShippingCosts(\DecimalType $price) : \GXEngineProduct

Sets the shipping costs of a product.

Arguments

$price

\DecimalType

The shipping costs to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Shipping Time ID

setShippingTimeId(\IdType $id) : \GXEngineProduct

Sets the shipping time ID of a product.

Arguments

$id

\IdType

The shipping time ID to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Short Description

setShortDescription(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the products description.

Arguments

$text

\StringType

The short description.

$language

\LanguageCode

The language code for the short description.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Sort Order

setSortOrder(\IntType $sortOrder) : \GXEngineProduct

Sets the sort order of the product.

Arguments

$sortOrder

\IntType

The sort order.

Response

\GXEngineProduct

Same instance for chained method calls.

Sets Special offer id.

setSpecialOfferId(\IdType $id) : \GXEngineProduct

Arguments

$id

\IdType

The special offer id.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Tax Class ID

setTaxClassId(\IdType $id) : \GXEngineProduct

Sets a tax class ID for the product.

Arguments

$id

\IdType

The tax class ID to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Product's Info URL

setUrl(\StringType $url, \LanguageCode $language) : \GXEngineProduct

Sets the product's info URL (e.g. homepage of the manufacturer).

deprecated

Use ::setInfoUrl() instead. Will be removed in GX3.11.

Arguments

$url

\StringType

The URL.

$language

\LanguageCode

The language code.

Response

\GXEngineProduct

Same instance for chained method calls.

Set URL Keywords

setUrlKeywords(\StringType $text, \LanguageCode $language) : \GXEngineProduct

Sets the products URL Keywords.

Arguments

$text

\StringType

The URL Keywords.

$language

\LanguageCode

The language code for the URL keywords.

Response

\GXEngineProduct

Same instance for chained method calls.

Set URL rewrite

setUrlRewrite(\UrlRewrite $urlRewrite, \LanguageCode $language) : \GXEngineProduct

Sets the products URL rewrite for the provided language code.

Arguments

$urlRewrite

\UrlRewrite

The URL rewrite instance.

$language

\LanguageCode

The language code for the URL keywords.

Response

\GXEngineProduct

Same instance for chained method calls.

Set URL rewrites

setUrlRewrites(\UrlRewriteCollection $urlRewrites) : \GXEngineProduct

Sets the products URL rewrites.

Arguments

$urlRewrites

\UrlRewriteCollection

The URL rewrites.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Viewed Count

setViewedCount(\IntType $count, \LanguageCode $language) : \GXEngineProduct

Sets the viewed count.

Arguments

$count

\IntType

The amount of views.

$language

\LanguageCode

The language code for the product name.

Response

\GXEngineProduct

Same instance for chained method calls.

Set VPE Active

setVpeActive(\BoolType $status) : \GXEngineProduct

Activates or deactivates VPE for a product.

Arguments

$status

\BoolType

Should VPE be activated?

Response

\GXEngineProduct

Same instance for chained method calls.

Set VPE ID

setVpeId(\IdType $id) : \GXEngineProduct

Sets the VPE ID of a product.

Arguments

$id

\IdType

The VPE ID to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set VPE Value

setVpeValue(\DecimalType $vpeValue) : \GXEngineProduct

Sets the VPE value of a product.

Arguments

$vpeValue

\DecimalType

The VPE value to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Set Weight

setWeight(\DecimalType $weight) : \GXEngineProduct

Sets the weight of a product.

Arguments

$weight

\DecimalType

The weight to set.

Response

\GXEngineProduct

Same instance for chained method calls.

Properties

Product settings

settings : \ProductSettingsInterface

Determines whether this product is active.

active : boolean
var

Type(s)

boolean

Sort order

sortOrder : integer
var

Type(s)

integer

Available DateTime

availableDateTime : \EmptyDateTime
var

Type(s)

\EmptyDateTime

Added DateTime

addedDateTime : \DateTime
var

Type(s)

\DateTime

Last modified DateTime

lastModifiedDateTime : \DateTime
var

Type(s)

\DateTime

Viewed count

viewedCount : \EditableKeyValueCollection

Ordered count

orderedCount : integer
var

Type(s)

integer

Names collection

names : \EditableKeyValueCollection

Description collection

descriptions : \EditableKeyValueCollection

Short description collection

shortDescriptions : \EditableKeyValueCollection

Keyword collection

keywords : \EditableKeyValueCollection

Meta title collection

metaTitles : \EditableKeyValueCollection

Meta description collection

metaDescriptions : \EditableKeyValueCollection

Meta keywords collection

metaKeywords : \EditableKeyValueCollection

Manufacturer URL

url : \EditableKeyValueCollection
deprecated

Use $infoUrl instead. Will be removed in GX3.11.

var

Type(s)

\EditableKeyValueCollection

URL keywords

urlKeywords : \EditableKeyValueCollection

URL rewrites

urlRewrites : \UrlRewriteCollection
var

Type(s)

\UrlRewriteCollection

Checkout information collection

checkoutInformation : \EditableKeyValueCollection

Product model

productModel : string
var

Type(s)

string

EAN

ean : string
var

Type(s)

string

Price

price : float
var

Type(s)

float

Tax class ID

taxClassId : integer
var

Type(s)

integer

Quantity

quantity : float
var

Type(s)

float

Weight

weight : float
var

Type(s)

float

Discount allowed

discountAllowed : float
var

Type(s)

float

Shipping costs

shippingCosts : float
var

Type(s)

float

Shipping time ID

shippingTimeId : integer
var

Type(s)

integer

Product type ID

productTypeId : integer
var

Type(s)

integer

Manufacturer ID

manufacturerId : integer
var

Type(s)

integer

Quantity Unit ID

quantityUnitId : integer
var

Type(s)

integer

Is FSK 18?

fsk18 : boolean
var

Type(s)

boolean

Is VPE active?

vpeActive : boolean
var

Type(s)

boolean

VPE ID

vpeId : integer
var

Type(s)

integer

VPE value

vpeValue : float
var

Type(s)

float

Addons collection

addonValues : \EditableKeyValueCollection

Image container

imageContainer : \ProductImageContainer

Url for further information of the product (e.g. manufacturer homepage)

infoUrl : \EditableKeyValueCollection

Special offer id.

specialOfferId : integer
var

Type(s)

integer