PugMoRe_Mageploy_Helper_Data::getAttributeSetId PHP Method

getAttributeSetId() public method

public getAttributeSetId ( $attributeSetName, $entityTypeCode )
    public function getAttributeSetId($attributeSetName, $entityTypeCode)
    {
        $entityTypeId = Mage::getModel('eav/entity')->setType($entityTypeCode)->getTypeId();
        $attributeSet = Mage::getModel('eav/entity_attribute_set')->getCollection()->setEntityTypeFilter($entityTypeId)->addFieldToFilter('attribute_set_name', $attributeSetName)->getFirstItem();
        return $attributeSet->getAttributeSetId();
    }