arog Posted February 14, 2022 Posted February 14, 2022 (edited) Hi I need to create a new group so I end up with this code : $new_group = new Group(); $new_group->name = ''.$name.''; $new_group->price_display_method = 1; //0 - Doesn't display price 1 - Display price $new_group->add(); But I'm getting this error : The property Group->name is empty If I print_r $new_group before trying to add it, I can see the name property is set Group Object ( [id] => [name] => fdhgfdhgdfhgdfh [reduction] => [price_display_method] => 1 [show_prices] => 1 [date_add] => [date_upd] => ........ Any help ? 😅 Edited February 14, 2022 by arog fixed (see edit history) Share this post Link to post Share on other sites More sharing options...
arog Posted February 14, 2022 Posted February 14, 2022 Found $new_group->name = array(Configuration::get('PS_LANG_DEFAULT') => $name); Share this post Link to post 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