1cctv Posted August 10, 2022 Share Posted August 10, 2022 (edited) I am running a web store on PS 1767. I need to change numerical ID of some categories. I have some links going to them (with other/old ID's) that I can't change in any way. In the meanwile I changed the store, category ID's are now different, links not going where they should. I am not a programmer but I can edit some code or work on the db using phpmyadmin. I found the categories and respective ID's in ps_category_lang. Also, there are a lot of cross references, like which product goes to which category (ID)...etc. Where exactly do I need to change and not mess-up everything? Should I edit the db? Maybe export category as csv file and import after editing? How can I do that safe and easy? I have the Store Manager software if that helps. Edited August 10, 2022 by 1cctv (see edit history) Link to comment Share on other sites More sharing options...
Ali Samie Posted August 10, 2022 Share Posted August 10, 2022 Why did you change id of category? It is a bad practice to modify database records manually. You need to explain more about what do you need and then we can offer better solutions. You wanted to fix something and instead you have made a mistake and ruined something else. Please explain what is it with changing the id of category Link to comment Share on other sites More sharing options...
1cctv Posted August 10, 2022 Author Share Posted August 10, 2022 (edited) 10 minutes ago, stifler97 said: Why did you change id of category? It is a bad practice to modify database records manually. You need to explain more about what do you need and then we can offer better solutions. You wanted to fix something and instead you have made a mistake and ruined something else. Please explain what is it with changing the id of category I explained already. For marketing purpose. I have advertising links on many web sites that I do not own and can not revise. Those are sending to wrong category ID now, I need to change back to old ID's that we had before updating the store. When we updated the store we lost the original ID's, store is the same, ID's are different now. Did not know at that time, now this is it. We just need to change those category ID's, from 106 to 173, from 22 to 58 and so on. Edited August 10, 2022 by 1cctv (see edit history) Link to comment Share on other sites More sharing options...
Ali Samie Posted August 10, 2022 Share Posted August 10, 2022 Do you have old categories in database? Link to comment Share on other sites More sharing options...
Ali Samie Posted August 10, 2022 Share Posted August 10, 2022 To my understanding this is what you have: 1. A link in other website that opens category id of 22 2. Category 22 is not what it meant to be and the correct one is now 58 3. So we need that link to go to category 58 Link to comment Share on other sites More sharing options...
Ali Samie Posted August 10, 2022 Share Posted August 10, 2022 What about a module that redirects customers from a specific category into another category? Link to comment Share on other sites More sharing options...
Ali Samie Posted August 10, 2022 Share Posted August 10, 2022 Imagine you have clicked on link to category 22 and this has to show 58. We can have a module that checks the category id and then if there is a map between 22 and any other category id then it redirects the customer to that category Link to comment Share on other sites More sharing options...
1cctv Posted August 10, 2022 Author Share Posted August 10, 2022 13 minutes ago, stifler97 said: Do you have old categories in database? Yes, some of them are but refers to other categories than needed. We can change those to avoid duplication. Link to comment Share on other sites More sharing options...
1cctv Posted August 10, 2022 Author Share Posted August 10, 2022 (edited) 22 minutes ago, stifler97 said: To my understanding this is what you have: 1. A link in other website that opens category id of 22 2. Category 22 is not what it meant to be and the correct one is now 58 3. So we need that link to go to category 58 yes. i may have an archive of the store saved at that time, i keep them. ID's needs to be changed anyway. Edited August 10, 2022 by 1cctv (see edit history) Link to comment Share on other sites More sharing options...
Ali Samie Posted August 10, 2022 Share Posted August 10, 2022 I just created this module. I hope this is useful for you: 1 Link to comment Share on other sites More sharing options...
El Patron Posted August 12, 2022 Share Posted August 12, 2022 if you don't know much about PS, as you admitted, in future you may want to ask someone before you modify something like this. also you should have done this on a test copy of your shop to test before commiting to production. following a couple of 'wise' steps like pre test, understanding implications of what you are about to do, would have saved your shop from destruction. I think stifler97 was very helpful to you, and probably his solution would solve...but I don't think you still understand what you did. 1 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