venditdevs Posted August 8, 2016 Share Posted August 8, 2016 Hi everyone,I'm pulling my hair out right now.We are integrating multistore in our module that connects our POS system to Prestashop.We want to add categories through import. That is working BUT ...all categories are added to ALL shops instead of the id_shop we are importing into. Does any of you know how we can manage that through the category object? The AdminCategoryController doesn't answer my questions With best regards,Vincent Link to comment Share on other sites More sharing options...
rocky Posted August 9, 2016 Share Posted August 9, 2016 Are you using the $id_shop parameter when creating the Category object? For example: $category = new Category($id_category, $id_lang, $id_shop); Link to comment Share on other sites More sharing options...
venditdevs Posted August 9, 2016 Author Share Posted August 9, 2016 *facepalm* Rocky, you saved my day. I was looking for a way to add them to multiple shops at once so i forgot all about the obvious. I'm writing a workaround for adding the categories to the shared shops in a group.Thanks for getting me back on the right track! 1 Link to comment Share on other sites More sharing options...
rocky Posted August 9, 2016 Share Posted August 9, 2016 I'm happy to help. Link to comment Share on other sites More sharing options...
venditdevs Posted August 9, 2016 Author Share Posted August 9, 2016 (edited) Update: it's working for existing categories but for new categories it's adding them to all shops regardless if the id_shop is set. Update2: Never mind, i'm going to get really drunk now. Edited August 9, 2016 by venditdevs (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted August 9, 2016 Share Posted August 9, 2016 Strange. I guess you'll have to write a query to delete the categories from unwanted shops after adding them. 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