public function GetPrimaryImage()
    {
        $oPrimaryImage = &$this->GetFromInternalCache('oPrimaryImage');
        if (is_null($oPrimaryImage)) {
            if (!empty($this->fieldCmsMediaDefaultPreviewImageId) && (!is_numeric($this->fieldCmsMediaDefaultPreviewImageId) || intval($this->fieldCmsMediaDefaultPreviewImageId) > 1000)) {
                $oShop = TdbShop::GetInstance();
                $aData = array('shop_article_id' => $this->id, 'cms_media_id' => $this->fieldCmsMediaDefaultPreviewImageId, 'position' => 1);
                $oPrimaryImage = TdbShopArticleImage::GetNewInstance();
                $oPrimaryImage->LoadFromRow($aData);
            } else {
                $oImages = &$this->GetFieldShopArticleImageList();
                $activePage = $this->getActivePageService()->getActivePage();
                if (0 == $oImages->Length() && (!is_null($activePage))) {
                    $oShop = TdbShop::GetInstance();
                    $aData = array('shop_article_id' => $this->id, 'cms_media_id' => $oShop->fieldNotFoundImage, 'position' => 1);
                    $oPrimaryImage = TdbShopArticleImage::GetNewInstance();
                    $oPrimaryImage->LoadFromRow($aData);
                } else {
                    $oImages->GoToStart();
                    $oPrimaryImage = &$oImages->Current();
                }
            }

            if (false === $oPrimaryImage) {
                $oPrimaryImage = null;
                if ($this->IsVariant()) {
                    $oParent = $this->GetFieldVariantParent();
                    if (null != $oParent) {
                        $oPrimaryImage = $oParent->GetPrimaryImage();
                    }
                }
            }
            $this->SetInternalCache('oPrimaryImage', $oPrimaryImage);
        }

        return $oPrimaryImage;
    }