spsurfer Posted May 16, 2017 Share Posted May 16, 2017 Hello, our webshop is working together with a shipping company (GLS) that allows us to print the labels from the exported orders. But the "Export" function won't eport the fields we need. This is what I get when I export an order: "ID";"Referencia";"Nuevo cliente";"Entrega";"Cliente";"Total";"Pago";"Estado";"Fecha"; "4633";"KURFOWLMG";"Sí";"España";"Name Cient";"20,95€";"PayPal";"Payment accepted";"2017-05-16 16:52:34"; Attached the information we need to be exported. I read that I can change the to be eported fields in the "SQL Manager" but don't have a clue how! Actually in the "SQL Manager" I have one field with "Orders" with the following code SELECT SQL_CALC_FOUND_ROWS a.`id_order`, `reference`, `total_paid_tax_incl`, `payment`, a.`date_add` AS `date_add`, a.id_currency, a.id_order AS id_pdf, CONCAT(LEFT(c.`firstname`, 1), '. ', c.`lastname`) AS `customer`, osl.`name` AS `osname`, os.`color`, IF((SELECT so.id_order FROM `uyy_orders` so WHERE so.id_customer = a.id_customer AND so.id_order < a.id_order LIMIT 1) > 0, 0, 1) as new, country_lang.name as cname, IF(a.valid, 1, 0) badge_success FROM `uyy_orders` a LEFT JOIN `uyy_customer` c ON (c.`id_customer` = a.`id_customer`) LEFT JOIN `uyy_address` address ON address.id_address = a.id_address_delivery LEFT JOIN `uyy_country` country ON address.id_country = country.id_country LEFT JOIN `uyy_country_lang` country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = 2) LEFT JOIN `uyy_order_state` os ON (os.`id_order_state` = a.`current_state`) LEFT JOIN `uyy_order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = 2) WHERE 1 ORDER BY a.`id_order` DESC Can anyone tell me how to configurate to export the desired information? Thanks in advance Nicolas Link to comment Share on other sites More sharing options...
DataKick Posted May 17, 2017 Share Posted May 17, 2017 Hi, you can use my free export module to prepare list you want to export - no SQL skills necessary, it's all done visually - see this short video. You can manually export the list to csv format, or deploy it to url (csv will be generated whenever someone access this url), or even schedule csv generation via cron. 1 Link to comment Share on other sites More sharing options...
spsurfer Posted May 17, 2017 Author Share Posted May 17, 2017 Thank you! I'll give it a try! Regards Nicolas Link to comment Share on other sites More sharing options...
spsurfer Posted May 18, 2017 Author Share Posted May 18, 2017 Hello, I installed DataKick but have some questions... (please see pm) Is there an option to just export the latest orders? Let's say, I made a list with name, adress, product description, etc. but I only want to export the orders placed today, can I filter these by date? Thanks in advance Nicolas Link to comment Share on other sites More sharing options...
DataKick Posted May 18, 2017 Share Posted May 18, 2017 (edited) Hello, I installed DataKick but have some questions... (please see pm) Is there an option to just export the latest orders? Let's say, I made a list with name, adress, product description, etc. but I only want to export the orders placed today, can I filter these by date? Thanks in advance Nicolas Hi Nicolas, sure, it's possible. We will need to create a condition that will filter our dataset. I always recommend to first create column with the same (or similar) expression we will later use in condition, just to see which records will be filtered out. 1) Let's create Age column - number of days since order creation. Click on any column, and change it's expression to dateDiff(now(), order.dateCreated) This will return number of days between two dates: 2) create condition - switch to DataSet tab, click on Add Condition, and add something like dateDiff(now(), order.dateCreated) <= 1 This expression will return true for every order newer than 1 day. And that's it. Edited May 18, 2017 by DataKick (see edit history) Link to comment Share on other sites More sharing options...
spsurfer Posted May 18, 2017 Author Share Posted May 18, 2017 Thank you! I'll give it a try! Regards Nicolas 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