discount; } public function getPriceType() { return '%'; } public function apply($amount) { if ($this->getPriceType() == Discount::PERCENT_TYPE) { $amount = stPrice::applyDiscount($amount, $this->getValue()); } else { $amount -= stCurrency::exchange($this->getValue()); } return $amount > 0 ? $amount : 0; } public function getValueByUser() { return $this->getValue(); } }