Get price object
@param int $iPriceTypeID
@return \Illuminate\Database\Eloquent\Model|Price|null
435007
public function getPriceObject($iPriceTypeID = null)
    {
        if (empty($iPriceTypeID)) {
            $obPriceModel = $this->main_price;
        } else {
            $obPriceModel = $this->price_link->where('price_type_id', $iPriceTypeID)->first();
        }

        return $obPriceModel;
    }
1060233
public function getFUnitPrice()
    {
        if ($this->_fPricePerUnit == null) {
            if ($oPrice = $this->getUnitPrice()) {
                if ($dPrice = $this->_getPriceForView($oPrice)) {
                    $this->_fPricePerUnit = \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($dPrice);
                }
            }
        }

        return $this->_fPricePerUnit;
    }
1047312
protected function _getPriceForView($oPrice)
    {
        if ($this->_isPriceViewModeNetto()) {
            $dPrice = $oPrice->getNettoPrice();
        } else {
            $dPrice = $oPrice->getBruttoPrice();
        }

        return $dPrice;
    }
556909
public function getFPrice()
    {
        $dPrice = $this->getPrice();

        return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($dPrice, \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject());
    }
1031949
public function getPrice()
    {
        if (is_null($this->_oPrice)) {
            /** @var \OxidEsales\Eshop\Core\Price $price */
            $price = oxNew(\OxidEsales\Eshop\Core\Price::class);
            $this->setPrice($price);
        }

        return $this->_oPrice;
    }
202813
protected function _getPriceObject()
    {
        $oPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);

        if ($this->isCalculationModeNetto()) {
            $oPrice->setNettoPriceMode();
        } else {
            $oPrice->setBruttoPriceMode();
        }

        return $oPrice;
    }
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;
    }
309635
protected function savePriceValue($iPriceTypeID, $fPrice, $fOldPrice)
    {
        $obPriceModel = $this->getPriceObject($iPriceTypeID);
        if (empty($obPriceModel)) {
            $obPriceModel = Price::create([
                'item_id'       => $this->id,
                'item_type'     => static::class,
                'price'         => $fPrice,
                'old_price'     => $fOldPrice,
                'price_type_id' => $iPriceTypeID,
            ]);

            if (empty($iPriceTypeID)) {
                $this->main_price = $obPriceModel;
            } else {
                $this->price_link()->add($obPriceModel);
            }
        } else {
            $obPriceModel->price = $fPrice !== null ? $fPrice : $obPriceModel->price;
            $obPriceModel->old_price = $fOldPrice !== null ? $fOldPrice : $obPriceModel->old_price;
            $obPriceModel->save();
        }
    }
43655
public function get( $id ) {
		if ( isset( $this->types[ $id ] ) ) {
			return $this->types[ $id ];
		}

		return null;
	}
1075412
public function findOne($idValue, $returnType = Table::RETURN_MODEL) {
        if (is_object($idValue)) {
            $getPK = 'get' . ucfirst(U::_toCamel($this->getPrimaryKey()));
            $idValue = $idValue->$getPK();
        }

        return $this->findOneBy($this->getPrimaryKey(), $idValue, $returnType);
    }
796029
public static function get($id){
		if( isset(self::$instances[$id]) ){
			return self::$instances[$id];
		}
		return null;
	}
165470
public static function getByIdType($id, $type)
    {
        $o = self::factory($type);
		$o->load($id);
        return $o;
    }
918694
public function getById($id)
    {
        $id = (int) $id;
        $rowSet = $this->getTableGateway()->select([$this->getPrimaryKey() => $id]);
        $row = $rowSet->current();
        return $row;
    }
668950
public function getBlockTypeById(int $blockTypeId)
    {
        if ($this->_blockTypesById !== null && array_key_exists($blockTypeId, $this->_blockTypesById)) {
            return $this->_blockTypesById[$blockTypeId];
        }

        $result = $this->_createBlockTypeQuery()
            ->where(['id' => $blockTypeId])
            ->one();

        return $this->_blockTypesById[$blockTypeId] = $result ? new SuperTableBlockTypeModel($result) : null;
    }
101378
private function getPriceDataReader($typeId)
    {
        $priceModifier = $this->priceReaderPool['default'];

        if (isset($this->priceReaderPool[$typeId])) {
            $priceModifier = $this->priceReaderPool[$typeId];
        }

        return $priceModifier;
    }
123252
public function get($rawId)
    {
        $row = $this->getCart()->get($rawId);

        return is_null($row) ? null : new Item($row);
    }
1286410
public function GetPrice()
    {
        if (is_null($this->dPrice)) {
            $this->dPrice = 0;

            // price based on basket
            if ($this->fieldValueBasedOnEntireBasket) {
                $oBasket = TShopBasket::GetInstance();
                $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation = 0;
                $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation = 0;
                $oItemList = $oBasket->GetBasketContents();
                $oItemList->GoToStart();
                while ($oItem = &$oItemList->Next()) {
                    if ($oItem->fieldExcludeFromShippingCostCalculation) {
                        $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation += $oItem->dAmount;
                        $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation += $oItem->dPriceTotalAfterDiscount;
                    }
                }
                $oItemList->GoToStart();

                if ('absolut' == $this->fieldValueType) {
                    $this->dPrice = $this->fieldValue;
                    if ($this->fieldAddValueForEachArticle ||
                        ($iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation > 0 &&
                         $oBasket->dTotalNumberOfArticles == $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation
                        )
                    ) {
                        $this->dPrice = ($oBasket->dTotalNumberOfArticles - $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation) * $this->dPrice;
                    }
                } else {
                    $this->dPrice = round($this->ApplyPriceModifiers(($oBasket->dCostArticlesTotalAfterDiscounts - $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation) * ($this->fieldValue / 100)), 2);
                }
            } else {
                // price based on current list
                /** @var $oArticleList TShopBasketArticleList */
                $oArticleList = &$this->GetAffectedBasketArticles();
                if (!is_null($oArticleList)) {
                    $iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation = 0;
                    $iTotalDiscountedPriceOfArticlesInListThatAreExcludedFromShippingCostCalculation = 0;
                    $oArticleList->GoToStart();
                    while ($oArticle = &$oArticleList->Next()) {
                        if ($oArticle->fieldExcludeFromShippingCostCalculation) {
                            $iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation += $oArticle->dAmount;
                            $iTotalDiscountedPriceOfArticlesInListThatAreExcludedFromShippingCostCalculation += $oArticle->dPriceTotalAfterDiscount;
                        }
                    }
                    $oArticleList->GoToStart();

                    if ('absolut' == $this->fieldValueType) {
                        $this->dPrice = $this->fieldValue;
                        if ($this->fieldAddValueForEachArticle ||
                            ($iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation > 0 &&
                             $oArticleList->dNumberOfItems == $iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation
                            )
                        ) {
                            $this->dPrice = ($oArticleList->dNumberOfItems - $iTotalNumberOfArticlesInListThatAreExcludedFromShippingCostCalculation) * $this->dPrice;
                        }
                    } else {
                        $this->dPrice = round($this->ApplyPriceModifiers(($oArticleList->dProductPrice - $iTotalDiscountedPriceOfArticlesInListThatAreExcludedFromShippingCostCalculation) * ($this->fieldValue / 100)), 2);
                    }
                }
            }
        }

        return $this->dPrice;
    }