class DiscountAmount extends AbstractAction

Class DiscountAmount

Properties

static string $elementType from AbstractAction
static string $type
int $currency
float $amount

Methods

setValues( array $values)

No description

string
__toString()

No description

static  string
getElementType()

No description

static  string
getType()

No description

bool
applyRule( Cart $cart)

Apply Rule to Cart.

bool
unApplyRule( Cart $cart)

Remove Rule from Cart.

int
getDiscountCart( Cart $cart, boolean $withTax = true)

Calculate discount.

float
getDiscountProduct( float $basePrice, Product $product)

Calculate discount.

float|boolean
getPrice( Product $product)

get new price for product.

int
getCurrency()

No description

setCurrency( int $currency)

No description

float
getAmount()

No description

setAmount( float $amount)

No description

Details

in AbstractActionCondition at line line 36
setValues( array $values)

Parameters

array $values

in AbstractActionCondition at line line 54
string __toString()

Return Value

string

in AbstractActionCondition at line line 62
static string getElementType()

Return Value

string

in AbstractActionCondition at line line 70
static string getType()

Return Value

string

at line line 81
bool applyRule( Cart $cart)

Apply Rule to Cart.

Parameters

Cart $cart

Return Value

bool

at line line 93
bool unApplyRule( Cart $cart)

Remove Rule from Cart.

Parameters

Cart $cart

Return Value

bool

at line line 106
int getDiscountCart( Cart $cart, boolean $withTax = true)

Calculate discount.

Parameters

Cart $cart
boolean $withTax

Return Value

int

at line line 130
float getDiscountProduct( float $basePrice, Product $product)

Calculate discount.

Parameters

float $basePrice
Product $product

Return Value

float

in AbstractAction at line line 71
float|boolean getPrice( Product $product)

get new price for product.

Parameters

Product $product

Return Value

float|boolean $price

at line line 45
int getCurrency()

Return Value

int

at line line 53
setCurrency( int $currency)

Parameters

int $currency

at line line 61
float getAmount()

Return Value

float

at line line 69
setAmount( float $amount)

Parameters

float $amount