hitstore Posted March 3, 2014 Share Posted March 3, 2014 Hi, I need an SQL query to export product_id with category_name. I'm start to study sql, but it too early to solve. Can anyone help me ? There's a way to export also secondary category ? thank you. Link to comment Share on other sites More sharing options...
paulandw Posted March 3, 2014 Share Posted March 3, 2014 Something like this? SELECT cp.id_product, cl.name FROM p_category_product as cp LEFT join p_category_lang as cl on cp.id_category = cl.id_category; Link to comment Share on other sites More sharing options...
hitstore Posted March 4, 2014 Author Share Posted March 4, 2014 (edited) Ok, it's working ! But, for example, its possible to export in separated field id, default_category and secondary category ? I guess if I re-import a csv with an id with two categories in succession like this : id_product;name 10;PC Brand 10;All-in-One in this case, the second row overwrite the first. Can someone help me to obtain this sintax ? 10;PC Brand, All-in-One ? Thanks Edited March 4, 2014 by hitstore (see edit history) Link to comment Share on other sites More sharing options...
paulandw Posted March 6, 2014 Share Posted March 6, 2014 Ok, it's working ! But, for example, its possible to export in separated field id, default_category and secondary category ? I guess if I re-import a csv with an id with two categories in succession like this : id_product;name 10;PC Brand 10;All-in-One in this case, the second row overwrite the first. Can someone help me to obtain this sintax ? 10;PC Brand, All-in-One ? Thanks What are you trying to accomplish? We are about to move to PrestaShop, so we don't really know the solution that well yet. But why don't you simply import directly to p_category_product? Things can be listed after each other, but it will break the normalization rules. What if some of the products have 4 or 5 categories? Link to comment Share on other sites More sharing options...
hitstore Posted March 6, 2014 Author Share Posted March 6, 2014 I need to include category field in my csv for the import updates of price and quantity. Some product has more than default category. es.: an headset con be on "multimedia" and "gamers accessories"... When I update a product without include category field, prestashop set category of each to "home page" again... so I lost all category information of all products. I think it's a problem of import routine, but nobody has tryed to solve my problem. 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