phpDocumentor

GoogleAnalyticsProduct
in package
implements GoogleAnalyticsProductInterface

Class GoogleAnalyticsProduct

Interfaces, Classes and Traits

GoogleAnalyticsProductInterface
Interface GoogleAnalyticsProductInterface

Table of Contents

$brand  : string|null
$category  : string|null
$coupon  : string|null
$id  : string|null
$listPosition  : int|null
$name  : string|null
$price  : float|null
$quantity  : int|null
$variant  : string|null
brand()  : null|string
Returns the brand of the item.
category()  : null|string
Returns the item category.
coupon()  : null|string
Returns the coupon code for a purchasable item.
create()  : GoogleAnalyticsProduct
Named constructor of GoogleAnalyticsProductDataSet.
id()  : null|string
Returns the unique ID/SKU for the item.
listPosition()  : int|null
Returns the the position of the item in the list.
name()  : null|string
Returns the item name.
price()  : float|null
Returns the purchase price of the item.
quantity()  : int|null
Returns the item quantity.
variant()  : null|string
Returns the item variant.
__construct()  : mixed
GoogleAnalyticsProductDataSet constructor.

Properties

Methods

brand()

Returns the brand of the item.

public brand() : null|string
Return values
null|string

Brand of the item.

category()

Returns the item category.

public category() : null|string
Return values
null|string

Item category.

coupon()

Returns the coupon code for a purchasable item.

public coupon() : null|string
Return values
null|string

Coupon code for a purchasable item.

create()

Named constructor of GoogleAnalyticsProductDataSet.

public static create([string|null $id = null ][, string|null $name = null ][, string|null $brand = null ][, string|null $category = null ][, string|null $variant = null ][, float|null $price = null ][, float|null $quantity = null ][, string|null $coupon = null ][, int|null $listPosition = null ]) : GoogleAnalyticsProduct
Parameters
$id : string|null = null

Unique ID/SKU for the item.

$name : string|null = null

Item name.

$brand : string|null = null

Brand of the item.

$category : string|null = null

Item category.

$variant : string|null = null

Item variant.

$price : float|null = null

Purchase price of the item.

$quantity : float|null = null

Item quantity.

$coupon : string|null = null

Coupon code for a purchasable item.

$listPosition : int|null = null

The position of the item in the list.

Return values
GoogleAnalyticsProduct

New instance.

id()

Returns the unique ID/SKU for the item.

public id() : null|string
Return values
null|string

Unique ID/SKU for the item.

listPosition()

Returns the the position of the item in the list.

public listPosition() : int|null
Return values
int|null

The position of the item in the list.

price()

Returns the purchase price of the item.

public price() : float|null
Return values
float|null

Purchase price of the item.

__construct()

GoogleAnalyticsProductDataSet constructor.

private __construct([NonEmptyStringType|null $id = null ][, NonEmptyStringType|null $name = null ][, NonEmptyStringType|null $brand = null ][, NonEmptyStringType|null $category = null ][, NonEmptyStringType|null $variant = null ][, DecimalType|null $price = null ][, DecimalType|null $quantity = null ][, NonEmptyStringType|null $coupon = null ][, IntType|null $listPosition = null ]) : mixed
Parameters
$id : NonEmptyStringType|null = null

Unique ID/SKU for the item.

$name : NonEmptyStringType|null = null

Item name.

$brand : NonEmptyStringType|null = null

Brand of the item.

$category : NonEmptyStringType|null = null

Item category.

$variant : NonEmptyStringType|null = null

Item variant.

$price : DecimalType|null = null

Purchase price of the item.

$quantity : DecimalType|null = null

Item quantity.

$coupon : NonEmptyStringType|null = null

Coupon code for a purchasable item.

$listPosition : IntType|null = null

The position of the item in the list.

Return values
mixed

Search results