I need the following: A script that fetches data from a database and creates attribute groups and attributes. Data structure 1) Key, Name Data structure 2) Group, Name Key, Name The script should create the Key in a custom attribute set (constant name, set by variable). e.g. T123 mDataitem1 (DisplayOrder 2) T124 mDataitem2 (DisplayOrder 1) And H123 eHeading2 T123 eDataitem21 H124 eHeading3 T125 eDataitem31 (DisplayOrder 1) T126 eDataitem32 (DisplayOrder 2) This should result in the following structure: $attributeset $defaultcat Key T124 - Text mDataitem2 Key T123 - Text mDataitem1 And $attributeset H1234 - mHeading3 T125 mDataitem31 T126 mDataitem32 To be used: in command line Field types: All fields should be Text fields by default that are comparable The specific parameters at creation should be editable in the script. Implementation: PHP is ok. Needs to be implemented via Mage, no API like SOAP or XMLRPC is permitted. Direct SQL is also possible, if it is guaranteed to clear the relevant caches. Please line out your solution approach before acceptance of this. The pay version you are working against is http://www.magentocommerce.com/magento-connect/NETZKOLLEKTIV/extension/4587/coreapi