public static function GetActiveItemVariant($oArticle)
    {
        $aVariantTypeSelection = TdbShopVariantDisplayHandler::GetActiveVariantTypeSelection(true);
        if (is_array($aVariantTypeSelection)) {
            $oSet = &$oArticle->GetFieldShopVariantSet();
            if (null === $oSet) {
                return $oArticle;
            }
            $oTypes = &$oSet->GetFieldShopVariantTypeList();
            if (count($aVariantTypeSelection) == $oTypes->Length()) {
                if (!$oArticle->IsVariant()) {
                    $oVariants = &$oArticle->GetFieldShopArticleVariantsList($aVariantTypeSelection);
                } else {
                    $oParentArticle = $oArticle->GetFieldVariantParent();
                    $oVariants = &$oParentArticle->GetFieldShopArticleVariantsList($aVariantTypeSelection);
                }

                if (1 == $oVariants->Length()) {
                    $oArticle = $oVariants->Current();
                }
            }
        } elseif (!$oArticle->IsVariant()) {
            $oVariants = &$oArticle->GetFieldShopArticleVariantsList();
            if (1 == $oVariants->Length()) {
                $oArticle = $oVariants->Current();
            }
        }

        return $oArticle;
    }