How to create and email a generated pdf

  • Posts: 91
  • Thank you received: 3
  • Hikaserial Standard Hikashop Business
1 week 1 day ago #371529

-- HikaShop version -- : 6.4.0
-- Joomla version -- : 5.4.3

Hi, I have been thinking about this for a while, I would like to be able so sent an email with a generated (from different articles and information from the order) pdf.

Kind of like an invoice, but with additional information about the trip someone booked.

I have made some articles with some basic info that's important for all pdf's, but there will be articles with different information (or maybe it is better to put that info in some custom fields or???). I would like to combine that in some way....

Just typing this, I think of a sollution like one of the emails allready on hikashop, but I think it is more practical if it could be an attached pdf.

Anyway, what would be the best approach for this?

Hope I am making sense.

Last edit: 1 week 1 day ago by ezomerdijk.

Please Log in or Create an account to join the conversation.

  • Posts: 85507
  • Thank you received: 13986
  • MODERATOR
1 week 1 day ago #371530

Hi,

Here is what I would do:
- I would download the zip of the install package of the PDF invoice plugin ( www.hikashop.com/marketplace/product/18-plugin-pdf.html ).
- I would extract that zip in a folder
- I would ask an AI like claude code or openai codex to look at the folder content, and tell it what you want to do.
- It should normally propose to build a plugin implementing a similar event ( onBeforeMailSend ) and the HTML2PDF library in the plugin with extra code to get data from the order (usually in $data) to generate the PDFs like you need (you'll have to provide template PDFs or something).
www.hikashop.com/support/documentation/6...tml#onBeforeMailSend
Of course, you'll probably need some back and forth with the AI, testing, and maybe a bit of manual development.

A more traditional approach could be to try using HikaSerial:
www.hikashop.com/component/hikashop/product/17-hikaserial.html
It has an attach serial plugin to generate an image with text taken from custom fields:
www.hikashop.com/support/documentation/1...ns-attachserial.html
And there is a similar plugin included in it for PDF files.

The first approach is something I would do as a developer. The second approach doesn't involve code but is more restrictive in what you can do and requires fiddling with the settings.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum