How can i create an order invoice pdf file ?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
dheeraj
Posts: 26
Joined: 02 Jan 2021, 08:47

How can i create an order invoice pdf file ?

Post by dheeraj » 19 Jul 2021, 11:03

Laravel : 8.12
Aimeos : 2021.04
PHP Version : 7.4.18
Environment : Windows


I want to implement a feature to generate pdf file containing order invoice details for each order of the customer.
Do i need to implement decorator for the order manager or is it already implemented in the framework?

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: How can i create an order invoice pdf file ?

Post by aimeos » 19 Jul 2021, 20:19

A PDF is already sent with the order confirmation e-mail:
https://github.com/aimeos/ai-client-htm ... ayment/Pdf

You can adapt the template for the PDF copying this one:
https://github.com/aimeos/ai-client-htm ... andard.php

Do you need the PDF somewhere else?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
dheeraj
Posts: 26
Joined: 02 Jan 2021, 08:47

Re: How can i create an order invoice pdf file ?

Post by dheeraj » 20 Jul 2021, 07:57

I am not using ai-client-html frontend. I am creating a Vue app frontend and need to provide an invoice download link for each customer order.

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: How can i create an order invoice pdf file ?

Post by aimeos » 21 Jul 2021, 07:09

In that case you need to create a separate API endpoint using that generates the PDF based on the order data:
https://github.com/aimeos/ai-client-jso ... nt/JsonApi
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
dheeraj
Posts: 26
Joined: 02 Jan 2021, 08:47

Re: How can i create an order invoice pdf file ?

Post by dheeraj » 21 Jul 2021, 07:53

Yes, i am implementing separate JSON API endpoint that generates PDF based on order data but then what about sending the same pdf to the customer email address after an order is placed by customer ?
I think sending invoice pdf to customer email is embedded in ai-client-html extension and i am not using it so Do i have to create another separate json api endpoint or write any custom code for sending order invoice pdf to customer email ?

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: How can i create an order invoice pdf file ?

Post by aimeos » 21 Jul 2021, 07:58

Even if you don't use the ai-client-html extension for your frontend, it's handy for sending the order e-mails. You just need to configure the cronjobs.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply