Combining content types into a single PDF in Drupal 6
-
11-10-2019 - |
Question
So, I'm working on a Drupal 6 project that ultimately replaces a big, complex Excel spreadsheet with a workflow as such:
- Customer books an appointment via the Bookings API
- Employee goes to customer and does a bunch of measurements
- Employee enters measurements into either an uploaded Excel spreadsheet or a web-based form
- Website generates a PDF with measurement sheet and the output from the Invoice module
- Customer receives an email with link to watermarked version of PDF.
- Customer pays online and receives link to unwatermarked PDF.
My questions are:
- What is the best way to go about Part 3 (Such that the data can be used by Parts 4-6)? CCK fields and a custom content type?
- What is the best way to combine content types (I.e., "Measurements" custom content type with "Invoice" content type) into a single PDF?
- Bonus Marks: Any way to auto-populate Invoice module content types?
Any help will be muchly appreciated!
Solution 2
I ended up using:
a. Storm for CRM functionality
b. Simple Payments for Storm Invoice payment
c. Print module for PDF output
d. Calendar (+ Views) for appointment booking (Used internally; stage 1 changed to "employee sets up appointment" in Storm Project)
e. CCK + Flexifield for the measurement sheet content type
f. Custom-written module to pass cost values to Storm and automate tasks between Storm/CCK measurement sheet.
Ubercart really is overkill for simple payment applications. Alas, Simple Payments is pretty poorly supported. If only there was a unified payment API or something...
OTHER TIPS
You are actyally trying to sell a product with customisable input (comparable to a t-shirt with a custom print, but instead of using a custom picture, you use custom data).
Here is what I did for a comparable project:
- Use ubercart: http://www.ubercart.org/
- Use the UC Node Checkout extension, this allows you to link a node to an ubercart product and use the information in the node for your customised product: http://drupal.org/project/uc_node_checkout
- Here's an excellent walkthrough for UC Node Checkout: http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart
- You can use FileField for uploading the Excel file: http://drupal.org/project/filefield
- Make sure you use the Transliteration module: http://drupal.org/project/transliteration
- The PECL upload progress is also nice to have
- You will also need a csv reader, but haven't tried this yet
- Finally, to give a link to the file, you can use the Ubercart selling files mechanism: http://www.ubercart.org/docs/user/3345/selling_files
Bonus:
- You can use the Automatic node tite module to autoname a node: http://drupal.org/project/auto_nodetitle
- For other fields, you can use the token mechanism: http://drupal.org/project/token