prestatent Posted October 18, 2016 Share Posted October 18, 2016 PS 1.6.1.1 Hi Bear with me as this is a bit of a long query. I carried out the following to add additional groups to ps_category_group table via PHPMyAdmin, as I had already input the categories and didn't want to add these all manually via BO. I ran the following query to add the new records to ps_category_group: - insert into ps_category_group select id_category, 4 from ps_category_group where id_group = 3; This runs ok and creates exactly the same number of records for the id_group = 3 (which is the default "Customer" group). We have a process which runs automatically overnight and updates the categories from a CVS file in the correct format. What happens after this runs overnight is that some of new category groups I added via the query, disappear. Looking at classes/Category.php in function "updateGroup" adds and deletes category group records. Unfortunately, when it creates new category group records it only does so for the three default customer groups. See code below: public function updateGroup($list) { $this->cleanGroups(); if (empty($list)) { $list = array(Configuration::get('PS_UNIDENTIFIED_GROUP'), Configuration::get('PS_GUEST_GROUP'), Configuration::get('PS_CUSTOMER_GROUP')); } $this->addGroups($list); } I've created an override for this to get all the records from ps_group table so that all the addtional groups I've added are included. I have 3 questions: 1. Has anyone noticed this issue? 2. Is the fix I've applied the correct way of resolving this? 3. Is this a bug? Thank you. Link to comment Share on other sites More sharing options...
prestatent Posted October 24, 2016 Author Share Posted October 24, 2016 Anyone have any feedback on this or have they not encountered this? 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