求教!如何在模版中进行属性集调用? 
举例好比~~有两个属性集A,B
A 里有 a-1,a-2属性
B 里有 b-1,b-2属性
A 和 B 这两个属性集里都有params这个自定义的属性组,并分别包含 a-1,a-2 和 b-1,b-2我想在产品页里判断该产品用的是哪个属性集~~然后调用自定义属性组(params)里的所有属性进行循环输出
请问该如何实现~~要修改那些地方

解决方案 »

  1.   

     /**
         * Retrieve product attributes
         *
         * if $groupId is null - retrieve all product attributes
         *
         * @param   int $groupId
         * @return  array
         */
        public function getAttributes($groupId = null, $skipSuper=false)
        {
            $productAttributes = $this->getTypeInstance(true)->getEditableAttributes($this);
            if ($groupId) {
                $attributes = array();
                foreach ($productAttributes as $attribute) {
                    if ($attribute->isInGroup($this->getAttributeSetId(), $groupId)) {
                        $attributes[] = $attribute;
                    }
                }
            } else {
                $attributes = $productAttributes;
            }        return $attributes;
        }