class DiscountPercent extends AbstractAction

Class DiscountPercent

Properties

static string $elementType from AbstractAction
static string $type
int $currency_id
int $percent

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.

mixed
getCurrencyId()

No description

setCurrencyId( mixed $currency_id)

No description

int
getPercent()

No description

setPercent( int $percent)

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 119
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
mixed getCurrencyId()

Return Value

mixed

at line line 53
setCurrencyId( mixed $currency_id)

Parameters

mixed $currency_id

at line line 61
int getPercent()

Return Value

int

at line line 69
setPercent( int $percent)

Parameters

int $percent