Cart_Validation

Cart Validation Object

Tags
author

Barn2 Plugins info@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Table of Contents

$cart_item_key  : mixed
$passed  : mixed
$qualifying_total  : mixed
$rule  : mixed
__construct()  : mixed
Constructor.
failed_max()  : bool
Check if this fails a maximum based rule.
get_cart_item_key()  : string
Get the cart item key.
get_category_id()  : int|null
Get the category ID.
get_product_name()  : string
Get the product name.
get_qualifying_total()  : mixed
Get the qualifying total.
get_rule_level()  : string|null
Get the rule level.
get_rule_value()  : mixed
Get rule value.
get_type()  : string
Get rule type.
has_passed()  : bool
Has the validation passeed.

Properties

Methods

__construct()

Constructor.

public __construct(string $cart_item_key, mixed $qualifying_total, Abstract_Rule $rule) : mixed
Parameters
$cart_item_key : string
$qualifying_total : mixed
$rule : Abstract_Rule
Tags
Return values
mixed

failed_max()

Check if this fails a maximum based rule.

public failed_max() : bool
Tags
Return values
bool

get_cart_item_key()

Get the cart item key.

public get_cart_item_key() : string
Tags
Return values
string

get_category_id()

Get the category ID.

public get_category_id() : int|null
Tags
Return values
int|null

get_product_name()

Get the product name.

public get_product_name() : string
Tags
Return values
string

get_qualifying_total()

Get the qualifying total.

public get_qualifying_total() : mixed
Tags
Return values
mixed

get_rule_level()

Get the rule level.

public get_rule_level() : string|null
Tags
Return values
string|null

get_rule_value()

Get rule value.

public get_rule_value() : mixed
Tags
Return values
mixed

get_type()

Get rule type.

public get_type() : string
Tags
Return values
string

has_passed()

Has the validation passeed.

public has_passed() : bool
Tags
Return values
bool

Search results