francisjmm Posted February 12, 2021 Share Posted February 12, 2021 Hola a tod@s. ¿Sabríais decirme si hay algún módulo gratuito para exportar los pedidos a csv? He mirado el índice de aportes, pero el módulo al que se hace referencia me aparece como web caída. Muchas gracias. Saludos. Link to comment Share on other sites More sharing options...
cheteronda Posted February 24, 2021 Share Posted February 24, 2021 Yo he encontrado esta solución. Una consulta SQL. Al final donde indica o.current_state = 2, tienes que poner el id del estado ENVIADO (En mi caso el 4). Y donde indica ps_order_state_lang poner el prefijo de las tablas de tu bbdd. Exporta un csv con todos los pedidos que hayan sido enviados., Ya es cuestion de jugar un poco. SELECT d.id_order, os.name AS STATUS, d.product_name, d.product_upc, d.product_reference, d.product_price, d.product_quantity, d.product_weight, o.payment, o.date_upd, ad.company, ad.address1, ad.address2, ad.postcode, ad.city, ste.name AS state, cl.name AS country, ad.other, ad.phone_mobile, carrier.name AS carrier, CONCAT_WS(' ', g.firstname, g.lastname) AS customer, gl.name AS group_name FROM ps_order_detail d LEFT JOIN ps_orders o ON (d.id_order = o.id_order) LEFT JOIN ps_customer g ON (o.id_customer = g.id_customer) LEFT JOIN ps_address ad ON ( o.id_address_delivery = ad.id_address ) LEFT JOIN ps_state ste ON (ste.id_state = ad.id_state) LEFT JOIN ps_country_lang cl ON (cl.id_country = ad.id_country) LEFT JOIN ps_carrier carrier ON ( carrier.id_carrier = o.id_carrier ) LEFT JOIN ps_group_lang gl ON ( g.id_default_group = gl.id_group ) AND gl.name LIKE 'club%' LEFT JOIN ps_order_state_lang os ON ( o.current_state = os.id_order_state ) WHERE o.current_state = 4 ORDER BY o.date_add DESC 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