src/ShopBundle/objects/db/TShopArticle.class.php
public function GetVariantValuesAvailableForType($oVariantType, $aSelectedTypeValues = array())
    {
        $oVariantValueList = null;
        $aArticleIdList = $this->getVariantIDList($aSelectedTypeValues, true);

        if (count($aArticleIdList) > 0) {
            $query = "SELECT `shop_variant_type_value`.*
                FROM `shop_variant_type_value`
          INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id`
               WHERE `shop_variant_type_value`.`shop_variant_type_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->id)."'
                 AND `shop_article_shop_variant_type_value_mlt`.`source_id` IN ('".implode("','", $aArticleIdList)."')
            GROUP BY `shop_variant_type_value`.`id`
            ORDER BY `shop_variant_type_value`.`".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->fieldShopVariantTypeValueCmsfieldname).'`
             ';

            $oVariantValueList = TdbShopVariantTypeValueList::GetList($query);
        }

        return $oVariantValueList;
    }
public function GetVariantValuesAvailableForType($oVariantType, $aSelectedTypeValues = array())
    {
        $oVariantValueList = null;
        $aArticleIdList = $this->getVariantIDList($aSelectedTypeValues, true);

        if (count($aArticleIdList) > 0) {
            $query = "SELECT `shop_variant_type_value`.*
                FROM `shop_variant_type_value`
          INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id`
               WHERE `shop_variant_type_value`.`shop_variant_type_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->id)."'
                 AND `shop_article_shop_variant_type_value_mlt`.`source_id` IN ('".implode("','", $aArticleIdList)."')
            GROUP BY `shop_variant_type_value`.`id`
            ORDER BY `shop_variant_type_value`.`".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->fieldShopVariantTypeValueCmsfieldname).'`
             ';

            $oVariantValueList = TdbShopVariantTypeValueList::GetList($query);
        }

        return $oVariantValueList;
    }
public function GetVariantValuesAvailableForType ( $ oVariantType , $ aSelectedTypeValues = array ( ) ) { $ oVariantValueList = null ; $ aArticleIdList = $ this -> getVariantIDList ( $ aSelectedTypeValues , true ) ; if ( count ( $ aArticleIdList ) > 0 ) { $ query = "SELECT `shop_variant_type_value`.*
                FROM `shop_variant_type_value`
          INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id`
               WHERE `shop_variant_type_value`.`shop_variant_type_id` = '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ oVariantType -> id ) . "'
                 AND `shop_article_shop_variant_type_value_mlt`.`source_id` IN ('" . implode ( "','" , $ aArticleIdList ) . "')
            GROUP BY `shop_variant_type_value`.`id`
            ORDER BY `shop_variant_type_value`.`" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ oVariantType -> fieldShopVariantTypeValueCmsfieldname ) . '`
             ' ; $ oVariantValueList = TdbShopVariantTypeValueList :: GetList ( $ query ) ; } return $ oVariantValueList ; }
return all variant values that are available for the given type and this article.

@param TdbShopVariantType $oVariantType
@param array              $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...)

@return TdbShopVariantTypeValueList
return all variant values that are available for the given type and this article .