Download the PHP package thelia/pdf-default-template without Composer

On this page you can find all versions of the php package thelia/pdf-default-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pdf-default-template

Thelia default PDF template

The default PDF template of Thelia 3, rendered with Twig and converted to PDF by dompdf.

It contains four documents:

All of them are self-contained HTML with an embedded stylesheet: dompdf supports only a subset of CSS, so keep the styling simple. Translations live in translations/, under the pdf domain.

Compatibility

Layout

The documents are laid out to keep the printed page count down:

Language

A document is printed in the language the order was placed in, not in the language of whoever prints it: the customer is the one who keeps it. The invoice and the delivery note read it on the order; the credit note takes the language the module asks for, otherwise the one of the order it refunds. A credit note without order and without a requested language is printed in the language of the page.

The credit note document

The CreditNote module renders credit-note from the active PDF template with credit_note_id, and may add document_locale (the language to print in, the one its customer prefers) and credit_note_type_title (the type of the credit note in that language, since the loops translate in the language of the session). Without document_locale, the document is printed in the language of the refunded order. Everything else is read through the loops of the module (credit-note, credit-note-detail, credit-note-address) and of the core (order, order_product, customer, country, title).

The document prints:

Only an accepted credit note is served by the module, so the status is not printed.

Hooks

Every hook receives credit_note, the id of the credit note.

Hook Where
credit-note.css Inside the stylesheet
credit-note.header Above the document
credit-note.footer-top Above the running footer
credit-note.imprint Replaces the store block when it answers
credit-note.information Block hook: title / value fragments added to the information rows
credit-note.after-information Below the information block
credit-note.after-addresses Below the invoice address
credit-note.detail Inside the first cell of each line (credit_note_detail, order_product)
credit-note.after-detail After each line (credit_note_detail)
credit-note.after-products Below the lines table
credit-note.notice Left of the summary, for a usage notice
credit-note.after-summary Below the summary

Customization

Do not edit this template in place: an update will overwrite your changes. Copy it to templates/pdf/<your-template> and select it in the back office, or override only the files you need to change.

Documentation

https://doc.thelia.net

License

GPL-3.0-or-later


All versions of pdf-default-template with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3 <9.0
thelia/core Version ^3.3
thelia/twig-engine-module Version ^1.0.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thelia/pdf-default-template contains the following files

Loading the files please wait ...