Ovcharov Posted August 15, 2018 Share Posted August 15, 2018 Hello, I`m using presta version 1.6.1.20 and I`m trying to export my products. The task is to export all products with the tabs content and attachments. These are in different tables, so I tried to combine them in SQL manager, but without success. Can somebody, please help me to solve this out? This is what I use to export products: SELECT p.id_product, p.active, p.price, p.id_tax_rules_group, p.wholesale_price, p.reference, p.supplier_reference, p.id_supplier, p.id_manufacturer, p.upc, p.ecotax, p.weight, p.quantity, p.available_for_order, p.date_add, p.show_price, p.online_only, p.condition, p.id_shop_default FROM ps_product p GROUP BY p.id_product This is for the attachments: select id_product, id_attachment from ps_product_attachment group by id_product This for Tabs` IDs: Select id, id_product, position, status, id_shop from ps_prodtabs And finally the Tabs` content: select id_tabs, title, content from ps_prodtabs_data I know there is a way to combine everything, because that way I have 4 CSV, and I need it to be only in 1 CSV. Thanks! Link to comment Share on other sites More sharing options...
vekia Posted August 15, 2018 Share Posted August 15, 2018 you can use LEFT JOIN to get values from other tables, but if your product will have many tabs - you will get all the rows separately (not as a one row). Link to comment Share on other sites More sharing options...
Ovcharov Posted August 15, 2018 Author Share Posted August 15, 2018 Thank you, I tried that option, but I`m not very good at coding and didn`t set it right - I get errors. Can you give me an example how to merge these values with Left Join. There is only one tab, so no problems there. Really thank you for your time! Link to comment Share on other sites More sharing options...
kelvin Posted August 25, 2018 Share Posted August 25, 2018 Hello Legend, I want you to give me an advice concerning the way on how to get all the order that are placed. What am doing is, I want to get all the orders, i mean the current orders that are placed by customers so that i can change the order status based on some logic i wrote. How can i do something like this? Is there a hook that can help me get all the orders? I was thinking to use autovalidateorder hook. But i don't know how to use it. I will be much grateful for your feedback 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