getPriceRelation($country)->getRowPrice(); $price = self::applyDiscount($price, $count); } elseif(self::DEFAULT_PREPAYMENT == PrepaymentType::TYPE_ROW) { $price = $count * $style->getPriceRelation($country)->getRowPrice(); //$price = $price * 0.7; //30%sleva // $price = $price * 0.9; //30%sleva } return $price; } public static function applyDiscount($price, $count) { return $price * self::getDiscount($count); } /** * * @param int $count * @return float */ public static function getDiscount($count) { // if($count >= 6 && $count <= 10) // { // return 0.9; // 10% sleva // } // // if($count >= 11 && $count <= 15) // { // return 0.85; // 15% sleva // } return 1; } }