Jump to content

Add Delivery Slip column to customer order history


LauraBdG

Recommended Posts

Good morning,

In the customer order history (history.tpl) I added a column dedicated to delivery notes to give the customer the possibility to download the documents independently.

I also added the checkbox "Allow a customer to download and view PDF versions of their delivery slips" in the BO in the order statuses.

Visually everything is perfect but unfortunately when the document is generated and sent by email to the customer, nothing appears in the order history.

Has anyone already deloped this same function?

I use Prestashop 8.2.0.

Thank you 

Link to comment
Share on other sites

Hi.

1. you need to create PdfDeliverySlipController.php (you can find similar ./controllers/front/PdfInvoiceController.php)

image.thumb.png.1bf2cea901a7b000b9b168998bb0935f.png


2. create your own hook in the module (for example: displayDeliverySlipUrl and in the parameter you will get id_order)

image.thumb.png.7b807435ed5fb241c9573f0e3dc09731.png


3. create your own TPL template in the module

image.png.1f64d9048bd1eaa0037d6c4cd8cb2d55.png


4. insert your own hook in history.tpl e.g. {hook h='displayDeliverySlipUrl' id_order=$order.details.id}

image.png.37bb052d5265029040fb0115d1251b47.png

image.png.8b2c405703614d324ae6b92a6539f92b.png

 

result:

image.thumb.png.891c643188f5112ab10bdfb98ce6da29.png

Edited by ps8modules (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...