Jump to content

Module to Export Orders


Burhan BVK
 Share

Recommended Posts

  • 3 months later...
  • 1 year later...

I've created sql for 1.6 to export the orders. I'll past below. Keep in mind the my db prefix is cicciabe (yours is likely ps). Also, I've chosen to only export orders with a status of 2 (payment accepted) so that I only export new orders. That number would need to be changed for different statuses.

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
    cicciabe_order_detail d
LEFT JOIN
    cicciabe_orders o
ON
    (d.id_order = o.id_order)
LEFT JOIN
    cicciabe_customer g
ON
    (o.id_customer = g.id_customer)
LEFT JOIN
    cicciabe_address ad
ON
    (
        o.id_address_delivery = ad.id_address
    )
LEFT JOIN
    cicciabe_state ste
ON
    (ste.id_state = ad.id_state)
LEFT JOIN
    cicciabe_country_lang cl
ON
    (cl.id_country = ad.id_country)
LEFT JOIN
    cicciabe_carrier carrier
ON
    (
        carrier.id_carrier = o.id_carrier
    )
LEFT JOIN
    cicciabe_group_lang gl
ON
    (
        g.id_default_group = gl.id_group
    ) AND gl.name LIKE 'club%'
LEFT JOIN
    cicciabe_order_state_lang os
ON
    (
        o.current_state = os.id_order_state
    )
WHERE
    o.current_state = 2
ORDER BY
    o.date_add
DESC

Share this post


Link to post
Share on other sites

  • 4 months later...

I close this thread. There is no support given from the developer since begin of last year. You can use it as it is. It was created for PS 1.2. versions and is not working for PS latest versions. Use instead the module here SQL queries like posted by Adria: https://www.prestashop.com/forums/topic/8424-module-to-export-orders/?do=findComment&comment=2599425

Or other module. Also with phpMyAdmin you will be able to export data from database in csv or xml formats.

If you want to export your orders to a csv-file you can also use the Presta Store Manager. You will find it on your back-office module list or on addons site.

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More