themuir Posted January 27, 2014 Posted January 27, 2014 Hi there guys, I have been racking my brains tonight. I may have been looking at this for too long.. Basically my website - I backed it up and wanst using it for a while so deleted some items. In the past 4 weeks I have added 400 new products and I wanted to import around 108 products from the backed up sql file I have. I have been having issues with importing the items via my sql (phpadmin). I wondered if it is possible to just delete all the sql data apart from the product and categories that I deleted and need to add once again. Any guidance will be greatly appreciated as adding these 108 products again will take me a while.
themuir Posted January 28, 2014 Author Posted January 28, 2014 has anyone got any ideas or suggestions on this issue?
themuir Posted January 28, 2014 Author Posted January 28, 2014 What I would like to do is import the categories and products from the sql back up using myphp admin. Adding these to the website. I have been trying this all day today and I can get the products into the website but only into the top category and not the categories I was using before. Also with these going into an uncategorised part of the website I can see them on the website but not in the admin section of oscommerce after logging in. I ideally it would be better to import the categories and then products as it is in the sql file. I suppose the question is has anyone done this? I cant get it to work.
♥kymation Posted January 28, 2014 Posted January 28, 2014 The products are connected to categories using the products_to_categories table. Your categories must have the same value for categories_id that they had when these products were in the database or the products may end up under the wrong category or no category at all. Regards Jim See my profile for a list of my addons and ways to get support.
themuir Posted January 28, 2014 Author Posted January 28, 2014 Ok thanks Jim. In simplest terms what do I need to import from the previous sql back up? I have been deleting and trying all sorts today. :-)
♥kymation Posted January 28, 2014 Posted January 28, 2014 That depends on what you have in the database now. If you have started over and added new categories, your old categories will not have the same ID as the new ones. Your old products were linked to the categories you had then, so any answer to this depends on what changes you have made since you backed up those old products. Regards Jim See my profile for a list of my addons and ways to get support.
themuir Posted January 28, 2014 Author Posted January 28, 2014 Thanks Jim. I disabled the products and then deleted the categories. Today I got the categories up and running again off the backed up sql file (but I really didnt know what I was doing) but I couldnt get the products into the previous categories. A few sql errors popped up. Probably do with other parts of the sql that I was importing and didnt have too. I know this is probably the wrong way to do stuff but I had no intentions of using the products but after thinking about it they have good google seo placements and it drives people back to the website. My thinking is to just import the old categories and products, edit them a little bit on oscommerce and then go from there but I'm not exactly what needs importing and what doesnt. Any assistance will be greatly appreciated.
themuir Posted January 29, 2014 Author Posted January 29, 2014 Well Jim, thanks for the assistance. Cracked on today with it and adding products_to_categories Thanks for taking the time to help me.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.