ovoce Posted July 7, 2013 Share Posted July 7, 2013 (edited) Hi, i am trying to create new attribut group by code, and then add attributes to it. But this code below doesn't work - I dont know, what I am doing wrong:( - anyone can help ? $newAttGroup = new AttributeGroupCore(); $newAttGroup->name[0] = 'sample name'; $newAttGroup->public_name[0] = 'sample name'; $newAttGroup->is_color_group = 0; $newAttGroup->group_type = 'test'; $newAttGroup->position = 0; $newAttGroup->add(); EDITED: Changed to: $newAttGroup = new AttributeGroupCore(); $newAttGroup->name[0] = 'sample name'; $newAttGroup->public_name[0] = 'sample name'; $newAttGroup->is_color_group = 0; $newAttGroup->group_type = 'test'; $newAttGroup->position = AttributeGroupCore::getHigherPosition() + 1; $newAttGroup->add(); and it works - don'T know why ... :/ Edited July 7, 2013 by ovoce (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now