IgnacioSM Posted February 12, 2015 Share Posted February 12, 2015 (edited) Hello, I'm trying to receive the position of the categories by another software, and then, I have to update the category position, or insert the category. how could I insert a category in a position and increment the position of the others if there are some duplicate positions? Ex: I want to insert a new category in position 3, and mofify th$cat = new Category($idClasificacionOnline); Code: $cat-id_parent = $idClasFather; Category::cleanPositions($idClasFather); $cat->addPosition(3, $idShop); It eliminates all the duplicates, but it left a category with position 3(obviously) and then, it inserts the new category with position 3. Finally, the result is that there are two categories with position 3. Any idea? Edited February 12, 2015 by IgnacioSM (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