Get discount_price_value attribute
@return float
438881
protected function getDiscountPriceValueAttribute()
    {
        $obPriceModel = $this->getPriceObject($this->getActivePriceType());
        $this->setActivePriceType(null);

        if (empty($obPriceModel)) {
            return 0;
        }

        $fPrice = $obPriceModel->discount_price_value;
        $fPrice = CurrencyHelper::instance()->convert($fPrice, $this->getActiveCurrency());

        return $fPrice;
    }
895116
protected function _getGroupPrice()
    {
        $sPriceSufix = $this->_getUserPriceSufix();
        $sVarName = "oxarticles__oxprice{$sPriceSufix}";
        $dPrice = $this->$sVarName->value;

        // #1437/1436C - added config option, and check for zero A,B,C price values
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blOverrideZeroABCPrices') && (double) $dPrice == 0) {
            $dPrice = $this->oxarticles__oxprice->value;
        }

        return $dPrice;
    }
821697
public function getDiscountAmount()
    {
        $total = 0;
        $discount = 0;
        
        foreach ($this->items as $item) {
            if ($item->Price) {
                $total += ($item->Price * $item->Quantity);
            }
            
            if ($item->Discount) {
                $discount += ($item->TotalDiscount);
            }
        }
        
        if ($discount > $total) {
            $discount = $total;
        }

        return $discount;
    }
820164
public function getTotalDiscountAttribute() {
        if (empty($this->shopCalculations)) $this->runCalculations();
        return round($this->shopCalculations->totalDiscount, 2);
    }
374088
public function getDiscount()
    {
        $discount = 0.00;

        $coupons = $this->facade->getCurrentCoupons();

        if (\count($coupons) > 0) {
            $couponsKept = $this->sortCoupons($coupons);

            $discount = $this->getEffect($couponsKept);

            // Just In Case test
            $checkoutTotalPrice = $this->facade->getCartTotalTaxPrice();

            if ($discount >= $checkoutTotalPrice) {
                $discount = $checkoutTotalPrice;
            }
        }

        return $discount;
    }
1210163
public function getRatingValue()
    {

        if ($this->_dRatingValue === null) {
            $this->_dRatingValue = (double) 0;
            if ($this->isReviewActive() && ($oDetailsProduct = $this->getProduct())) {
                $blShowVariantsReviews = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blShowVariantReviews');
                $this->_dRatingValue = round($oDetailsProduct->getArticleRatingAverage($blShowVariantsReviews), 1);
            }
        }

        return (double) $this->_dRatingValue;
    }
368212
public function getTotalAmount()
    {
        $total_amount = $this->unit_price * $this->quantity;

        if (!empty($this->total_discount_amount)) {
            return $total_amount - $this->total_discount_amount;
        }
        return $total_amount;
    }
1199963
public function GetTotalPrice()
    {
        if (is_null($this->dPrice)) {
            $this->dPrice = 0;
            $iPointer = $this->getItemPointer();
            $this->GoToStart();
            while ($oItem = &$this->Next()) {
                $this->dPrice += $oItem->GetPrice();
            }
            $this->setItemPointer($iPointer);
        }

        return $this->dPrice;
    }
761728
public function getPriceCurrency()
    {
        if (empty($this->price_currency)) {
            throw new LogicException(
                sprintf(self::ERROR_MISSING_ATTRIBUTE_FORMAT, 'price_currency')
            );
        }
        return $this->price_currency;
    }
418741
public function get_value() {
        $this->label = $this->grade->grade_item->itemname;

        $val = $this->grade->finalgrade;
        if ($this->grade->grade_item->scaleid) {
            return $val ? (int)$val : -1;
        } else {
            return $val ? format_float($val, $this->grade->grade_item->get_decimals()) : '';
        }
    }
681215
public function getPriceAttribute($val)
    {
        $currentCurrencyCode = Session::get('currency_code');

        if (null === $currentCurrencyCode) {
            return $val;
        }

        $siteCurrency = App::get(SiteCurrencyInterface::class);
        $model = $siteCurrency->findByCode($currentCurrencyCode);

        return $val * $model->conversion_rate;
    }
267876
public function getCost() {
        $totalCost = 0;
        if (Yii::$app->user->isGuest) {
            //Gets products from session
            $session = Yii::$app->session;
            $products = $session[self::SESSION_KEY];

            if (!empty($products)) {
                foreach ($products as $product) {

                    if (!empty($product['combinationId'])) {
                        $combination = Combination::findOne($product['combinationId']);
                        if (!empty($combination)) $totalCost += $combination->price->discountPriceFloor * $product['count'];
                    } else {
                        $productFromDb = Product::findOne($product['id']);
                        if (!empty($productFromDb))
                            $totalCost += $productFromDb->price->discountPriceFloor * $product['count'];
                    }

                    if (!empty($product['additionalProducts'])) {
                        foreach ($product['additionalProducts'] as $additionalProduct) {
                            if ((int)$additionalProduct['productId']) {
                                $product = Product::findOne($additionalProduct['productId']);
                                if (!empty($product)) {
                                    $totalCost += $product->price->discountPriceFloor * $additionalProduct['number'];
                                }
                            }
                        }
                    }
                }
            }
        } else {
            //Gets products from incomplete order in DB
            $order = Order::find()
                ->where(['user_id' => Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE])
                ->one();
            if (!empty($order)) {
                $orderProducts = OrderProduct::find()->where(['order_id' => $order->id])->all();
                if (!empty($orderProducts)) {
                    foreach ($orderProducts as $product) {
                        if (\Yii::$app->getModule('shop')->enableCombinations && !empty($product->combination)) {
                            $totalCost += $product->count * $product->combination->price->discountPriceFloor;
                        } else {
                            $totalCost += $product->count * $product->product->price->discountPriceFloor;
                        }
                        if (!empty($product->orderProductAdditionalProducts)) {
                            foreach ($product->orderProductAdditionalProducts as $orderProductAdditionalProduct) {
                                $totalCost += $orderProductAdditionalProduct->additionalProduct->price->discountPriceFloor *
                                    $orderProductAdditionalProduct->number;
                            }
                        }
                    }
                }
            }
        }
        return $totalCost;
    }
965633
public function getDiscountPrice()
    {
        $price = $this->getBaseDiscountPrice();

        if (\Yii::$app->getModule('shop')->enableCurrencyConversion) {
            $price = $price * Currency::currentCurrency();
        }
        if (\Yii::$app->getModule('shop')->enablePriceRounding) {
            $price = floor($price);
        }

        return $price;
    }
821716
public function getGrandTotalAttribute()
    {
        if (!$this->deliveryOption) return $this->total;

        return (float) round($this->total + $this->deliveryOption->price, 2);
    }
157728
protected function _getSerieDiscount()
    {
        $oSeries = $this->getSerie();
        $oDiscount = oxNew(\OxidEsales\Eshop\Application\Model\Discount::class);

        $oDiscount->setId($oSeries->getId());
        $oDiscount->oxdiscount__oxshopid = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxshopid->value);
        $oDiscount->oxdiscount__oxactive = new \OxidEsales\Eshop\Core\Field(true);
        $oDiscount->oxdiscount__oxactivefrom = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxbegindate->value);
        $oDiscount->oxdiscount__oxactiveto = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxenddate->value);
        $oDiscount->oxdiscount__oxtitle = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxserienr->value);
        $oDiscount->oxdiscount__oxamount = new \OxidEsales\Eshop\Core\Field(1);
        $oDiscount->oxdiscount__oxamountto = new \OxidEsales\Eshop\Core\Field(MAX_64BIT_INTEGER);
        $oDiscount->oxdiscount__oxprice = new \OxidEsales\Eshop\Core\Field(0);
        $oDiscount->oxdiscount__oxpriceto = new \OxidEsales\Eshop\Core\Field(MAX_64BIT_INTEGER);
        $oDiscount->oxdiscount__oxaddsumtype = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxdiscounttype->value == 'percent' ? '%' : 'abs');
        $oDiscount->oxdiscount__oxaddsum = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxdiscount->value);
        $oDiscount->oxdiscount__oxitmartid = new \OxidEsales\Eshop\Core\Field();
        $oDiscount->oxdiscount__oxitmamount = new \OxidEsales\Eshop\Core\Field();
        $oDiscount->oxdiscount__oxitmmultiple = new \OxidEsales\Eshop\Core\Field();

        return $oDiscount;
    }
273793
function rateValue()
    {
        if ( $this->RateValue === false )
        {
            /*
            $rateValue = '0.00000';
            if ( $this->attribute( 'custom_rate_value' ) > 0 )
            {
                $rateValue = $this->attribute( 'custom_rate_value' );
            }
            else
            {
                $rateValue = $this->attribute( 'auto_rate_value' );
                $rateValue = $rateValue * $this->attribute( 'rate_factor' );
                $rateValue = sprintf( "%7.5f", $rateValue );
            }
            */

            $rateValue = '0.00000';
            if ( $this->attribute( 'custom_rate_value' ) > 0 )
                $rateValue = $this->attribute( 'custom_rate_value' );
            else
                $rateValue = $this->attribute( 'auto_rate_value' );

            if ( $rateValue > 0 )
                $rateValue = $rateValue * $this->attribute( 'rate_factor' );

            $rateValue = sprintf( "%7.5f", $rateValue );

            $this->RateValue = $rateValue;
        }

        return $this->RateValue;
    }
483661
protected function getPriceListAttribute()
    {
        $arResult = [];

        foreach ($this->price_link as $obPrice) {
            $arResult[$obPrice->price_type_id] = [
                'price'     => $obPrice->price,
                'old_price' => $obPrice->old_price,
            ];
        }

        return $arResult;
    }