Jump to content

.csv file for shipping

Recommended Posts

Hello, do you know how to get a.csv file that contains the first and last name, customer address and order weight to print shipping labels from a .csv file please?

On the .csv files on the order page there is no customer address column.






Thanks a lot for your answer.

Share this post

Link to post
Share on other sites


You can use the SQL SQUERY below, you could add id to your "SQL Manager" in your back-office so you can run it whenever you want. (Keep in mind that with prestashop 1.7.5 the SQL manager does not work, it will work again in prestashop 1.7.6)

a.`date_add` AS `date_add`, 
a.id_order AS id_pdf,
c.`firstname` AS firstname,
c.`lastname` AS lastname,
osl.`name` AS `osname`,
IF((SELECT so.id_order FROM `ps_orders` AS 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, shop.name AS shop_name 
FROM `ps_orders` AS a 
LEFT JOIN `ps_customer` AS c ON (c.`id_customer` = a.`id_customer`)
INNER JOIN `ps_address` AS address ON address.id_address = a.id_address_delivery
INNER JOIN `ps_country` AS country ON address.id_country = country.id_country
INNER JOIN `ps_country_lang` AS country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = 1)
LEFT JOIN `ps_order_state` AS os ON (os.`id_order_state` = a.`current_state`)
LEFT JOIN `ps_order_state_lang` AS osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = 1) 
LEFT JOIN `ps_shop` AS shop
ON a.`id_shop` = shop.`id_shop` WHERE 1 AND a.id_shop IN (1) 
ORDER BY a.id_order DESC


Share this post

Link to post
Share on other sites

Hi This just gets customer name is there a way to include customer address and products purchased in this?


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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