returns a list of variants for the current article each with a unqiue value for $sVariantTypeIdentifier.

@param string $sVariantTypeIdentifier

@return TdbShopArticleList
967373
public function GetVariantsForVariantTypeName($sVariantTypeIdentifier)
    {
        $oArticleList = &$this->GetFromInternalCache('VariantsForVariantTypeName'.$sVariantTypeIdentifier);
        if (is_null($oArticleList)) {
            $oArticleList = null;
            $oVariantSet = &$this->GetFieldShopVariantSet();
            if (!is_null($oVariantSet)) {
                $oVariantType = $oVariantSet->GetVariantTypeForIdentifier($sVariantTypeIdentifier);
                if (!is_null($oVariantType)) {
                    $sQueryAddition = '';
                    if ($this->IsVariant()) {
                        $sCommmonParentId = $this->fieldVariantParentId;
                        // make sure the current article is part of the list
                        $sActingValueForTypeId = $this->GetVariantTypeActiveValue($oVariantType->id);
                        $sQueryAddition .= "AND ((`shop_article`.`id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' AND `shop_variant_type_value`.`id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sActingValueForTypeId)."') OR (`shop_article`.`id` != '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' AND `shop_variant_type_value`.`id` != '".MySqlLegacySupport::getInstance()->real_escape_string($sActingValueForTypeId)."'))";
                    } else {
                        $sCommmonParentId = $this->id;
                    }
                    $sActiveArticleRestriction = TdbShopArticleList::GetActiveArticleQueryRestriction(false);
                    if (!empty($sActiveArticleRestriction)) {
                        $sQueryAddition = $sQueryAddition.' AND ('.$sActiveArticleRestriction.')';
                    }

                    $query = "SELECT `shop_article`.*
                        FROM `shop_article`
                  INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_article`.`id` = `shop_article_shop_variant_type_value_mlt`.`source_id`
                  INNER JOIN `shop_variant_type_value` ON `shop_article_shop_variant_type_value_mlt`.`target_id` = `shop_variant_type_value`.`id`
                       WHERE `shop_article`.`variant_parent_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sCommmonParentId)."'
                         AND `shop_variant_type_value`.`shop_variant_type_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->id)."'
                         {$sQueryAddition}
                    GROUP BY `shop_variant_type_value`.`id`
                     ";
                    if (!empty($oVariantType->fieldShopVariantTypeValueCmsfieldname)) {
                        $query .= 'ORDER BY `shop_variant_type_value`.`'.MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->fieldShopVariantTypeValueCmsfieldname).'`';
                    }
                    //            print_r($query);exit();
                    $oArticleList = TdbShopArticleList::GetList($query);
                    $oArticleList->bAllowItemCache = true;
                    $this->SetInternalCache('VariantsForVariantTypeName'.$sVariantTypeIdentifier, $oArticleList);
                }
            }
        }

        return $oArticleList;
    }
1000870
public function getIdentifiers($with_current = false)
    {
        $identifiers = [];
        foreach ($this->resources as $name => $resource) {
            if (!(!$with_current && $name === $this->config->getResourceName())) {
                /** @noinspection PhpUndefinedMethodInspection */
                $identifiers[$name . 'Id'] = $resource->getId();
            }
        }
        return $identifiers;
    }
1308738
public static function GetRegisteredActiveVariantForCurrentSpot($sParentId)
    {
        $sShopVariantArticleId = false;
        if (array_key_exists(TdbShop::SESSION_ACTIVE_VARIANT_ARRAY, $_SESSION)) {
            $oGlobal = TGlobal::instance();
            $oExecutingModuleSpot = $oGlobal->GetExecutingModulePointer();
            if ($oExecutingModuleSpot) {
                $sSpotName = $oExecutingModuleSpot->sModuleSpotName;
                if (array_key_exists($sSpotName, $_SESSION[TdbShop::SESSION_ACTIVE_VARIANT_ARRAY]) && array_key_exists($sParentId, $_SESSION[TdbShop::SESSION_ACTIVE_VARIANT_ARRAY][$sSpotName])) {
                    $sShopVariantArticleId = $_SESSION[TdbShop::SESSION_ACTIVE_VARIANT_ARRAY][$sSpotName][$sParentId];
                }
            }
        }

        return $sShopVariantArticleId;
    }
741151
protected function GetReviewsForUser()
    {
        $oUserReviews = null;
        $oUser = TdbDataExtranetUser::GetInstance();
        if ($oUser->IsLoggedIn()) {
            $oUserReviews = $oUser->GetFieldShopArticleReviewList();
        }

        return $oUserReviews;
    }
517511
protected function GetArticleView($sShopArticleId = null, $sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array())
    {
        $oReturnObject = new stdClass();

        $oArticle = TdbShopArticle::GetNewInstance();
        $oArticle->Load($sShopArticleId);
        if ($oArticle->IsVariant()) {
            TdbShop::RegisterActiveVariantForSpot($this->sCallingSpotName, $oArticle->fieldVariantParentId, $oArticle->id);
        }
        $oReturnObject->sItemPage = $oArticle->Render($sViewName, $sViewType, $aCallTimeVars);
        $sKey = $oArticle->id;
        if ($oArticle->IsVariant()) {
            $sKey = $oArticle->fieldVariantParentId;
        }
        $oReturnObject->iListKey = 'key'.md5($sKey);

        return $oReturnObject;
    }
567664
public function variantContentType($variant)
    {
        $variants = $this->variantsAttribute();

        if ( ! empty($variants)) {
            return Arr::get($variants, "{$variant}.type") ?: false;
        }

        if (false !== ($type = $this->config->variantMimeType($variant))) {
            return $type;
        }

        return $this->contentType();
    }
813027
public function loadVariantInformation()
    {
        if ($this->_aVariantList === null) {
            $oProduct = $this->getProduct();

            //if we are child and do not have any variants then let's load all parent variants as ours
            if ($oParent = $oProduct->getParentArticle()) {
                $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

                $oParent->setNoVariantLoading(false);
                $this->_aVariantList = $oParent->getFullVariants(false);

                //lets additionally add parent article if it is sellable
                if (count($this->_aVariantList) && $myConfig->getConfigParam('blVariantParentBuyable')) {
                    //#1104S if parent is buyable load select lists too
                    $oParent->enablePriceLoad();
                    $oParent->aSelectlist = $oParent->getSelectLists();
                    $this->_aVariantList = array_merge([$oParent], $this->_aVariantList->getArray());
                }
            } else {
                //loading full list of variants
                $this->_aVariantList = $oProduct->getFullVariants(false);
            }

            // setting link type for variants ..
            foreach ($this->_aVariantList as $oVariant) {
                $this->_processProduct($oVariant);
            }
        }

        return $this->_aVariantList;
    }
627267
public function getNrOfCatArticles()
    {
        $sListType = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('ldtype');

        if (is_null($sListType)) {
            $sListType = $this->getConfig()->getConfigParam('sDefaultListDisplayType');
        }

        if ('grid' === $sListType) {
            $aNrOfCatArticles = $this->getConfig()->getConfigParam('aNrofCatArticlesInGrid');
        } else {
            $aNrOfCatArticles = $this->getConfig()->getConfigParam('aNrofCatArticles');
        }

        return $aNrOfCatArticles;
    }
905893
public function getArticleList()
    {
        if ($this->_aArticleList === null) {
            $this->_aArticleList = [];
            if (($oManufacturerTree = $this->getManufacturerTree())) {
                $oManufacturer = $this->getActManufacturer();
                if ($oManufacturer && ($oManufacturer->getId() != 'root') && $oManufacturer->getIsVisible()) {
                    list($aArticleList, $iAllArtCnt) = $this->_loadArticles($oManufacturer);
                    if ($iAllArtCnt) {
                        $this->_aArticleList = $aArticleList;
                    }
                }
            }
        }

        return $this->_aArticleList;
    }
444031
public function getArticleList()
    {
        if ($this->_oActRecommListArticles === null) {
            $this->_oActRecommListArticles = false;

            if (($oRecommList = $this->getActiveRecommList())) {
                $oItemList = $oRecommList->getArticles();

                if ($oItemList->count()) {
                    foreach ($oItemList as $key => $oItem) {
                        if (!$oItem->isVisible()) {
                            $oRecommList->removeArticle($oItem->getId());
                            $oItemList->offsetUnset($key);
                            continue;
                        }

                        $oItem->text = $oRecommList->getArtDescription($oItem->getId());
                    }
                    $this->_oActRecommListArticles = $oItemList;
                }
            }
        }

        return $this->_oActRecommListArticles;
    }
484470
public function variants($withOriginal = false)
    {
        $variants = array_keys($this->config->variantConfigs());

        if ($withOriginal && ! in_array(FileHandler::ORIGINAL, $variants)) {
            array_unshift($variants, FileHandler::ORIGINAL);
        }

        return $variants;
    }
1246976
private function getListProxy(ResultDataInterface $results, $currentPage, $pageSize, $listPagerUrl, $moduleSpotName)
    {
        return new LegacyMockArticleListWrapper($results, $currentPage, $pageSize, $listPagerUrl, $moduleSpotName);
    }
137564
public function &GetFieldPkgShopWishlistArticleList()
    {
        $oWishlistItems = $this->GetFromInternalCache('oPkgShopWishlistArticleList');
        if (is_null($oWishlistItems)) {
            $oWishlistItems = TdbPkgShopWishlistArticleList::GetListForPkgShopWishlistId($this->id, $this->iLanguageId);
            $oWishlistItems->bAllowItemCache = true;
            $this->SetInternalCache('oPkgShopWishlistArticleList', $oWishlistItems);
        }
        $oWishlistItems->GoToStart();

        return $oWishlistItems;
    }
870318
public function getAttributeName($sIdentifier)
    {
        static $aAttributesForSystemNames = null;
        static $aAttributesForIds = null;
        if (null === $aAttributesForSystemNames && null === $aAttributesForIds) {
            $oAttributesList = TdbShopAttributeList::GetList();
            while ($oAttribute = &$oAttributesList->Next()) {
                $sName = $oAttribute->GetName();
                $aAttributesForSystemNames[$oAttribute->fieldSystemName] = $sName;
                $aAttributesForIds[$oAttribute->id] = $sName;
            }
        }
        if (isset($aAttributesForSystemNames[$sIdentifier])) {
            return $aAttributesForSystemNames[$sIdentifier];
        } elseif (isset($aAttributesForIds[$sIdentifier])) {
            return $aAttributesForIds[$sIdentifier];
        } else {
            return '';
        }
    }
1373666
protected function GetAdditionalViewVariables($sViewName, $sViewType)
    {
        $aViewVariables = parent::GetAdditionalViewVariables($sViewName, $sViewType);

        if (!is_array($aViewVariables)) {
            $aViewVariables = array();
        }
        $aViewVariables['sPaymentRequestUrl'] = $this->GetPaymentURL();

        return $aViewVariables;
    }
476339
protected function RenderVariantDetails($sViewName, $aCallTimeVars = array())
    {
        $oView = new TViewParser();
        $aActivatedIds = $this->oTableRow->GetMLTIdList('shop_variant_type_value', 'shop_variant_type_value_mlt');
        $oView->AddVar('aActivatedIds', $aActivatedIds);
        $oView->AddVar('oField', $this);
        $oView->AddVarArray($aCallTimeVars);

        return $oView->RenderObjectView($sViewName, 'TCMSFields/TCMSFieldShopVariantDetails', 'Core');
    }
687090
protected function _getArticleItems(\OxidEsales\Eshop\Application\Model\ArticleList $oList)
    {
        $myUtilsUrl = Registry::getUtilsUrl();
        $aItems = [];
        $oLang = Registry::getLang();
        $oStr = getStr();

        foreach ($oList as $oArticle) {
            $oItem = new stdClass();
            $oActCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
            $sPrice = '';

            // check if article is a variant
            if ($oArticle->isParentNotBuyable()) {
                $oPrice = $oArticle->getVarMinPrice();
            } else {
                $oPrice = $oArticle->getPrice();
            }

            if ($oPrice) {
                $sFrom = ($oArticle->isRangePrice()) ? Registry::getLang()->translateString('PRICE_FROM') . ' ' : '';
                $sPrice .= ' ' . $sFrom . $oLang->formatCurrency($oPrice->getBruttoPrice(), $oActCur) . ' ' . $oActCur->sign;
            }

            $oItem->title = strip_tags($oArticle->oxarticles__oxtitle->value . $sPrice);
            $oItem->guid = $oItem->link = $myUtilsUrl->prepareUrlForNoSession($oArticle->getLink());
            $oItem->isGuidPermalink = true;
            // $oItem->description             = $oArticle->getLongDescription()->value; //oxarticles__oxshortdesc->value;
            //#4038: Smarty not parsed in RSS, although smarty parsing activated for longdescriptions
            if (Registry::getConfig()->getConfigParam('bl_perfParseLongDescinSmarty')) {
                $oItem->description = $oArticle->getLongDesc();
            } else {
                $oItem->description = $oArticle->getLongDescription()->value;
            }

            if (trim(str_replace('&nbsp;', '', (strip_tags($oItem->description)))) == '') {
                $oItem->description = $oArticle->oxarticles__oxshortdesc->value;
            }

            $oItem->description = trim($oItem->description);
            if ($sThumb = $oArticle->getThumbnailUrl()) {
                $oItem->description = "<img src='$sThumb' border=0 align='left' hspace=5>" . $oItem->description;
            }
            $oItem->description = $oStr->htmlspecialchars($oItem->description);

            if ($oArticle->oxarticles__oxtimestamp->value) {
                list($date, $time) = explode(' ', $oArticle->oxarticles__oxtimestamp->value);
                $date = explode('-', $date);
                $time = explode(':', $time);
                $oItem->date = date('D, d M Y H:i:s O', mktime($time[0], $time[1], $time[2], $date[1], $date[2], $date[0]));
            } else {
                $oItem->date = date('D, d M Y H:i:s O', time());
            }

            $aItems[] = $oItem;
        }

        return $aItems;
    }