v9x Advanced Invoice Builder and Custom Number by Globo Jsc Modified by RicRey V1.3.2

ricrey

Active member
Elite
XNullUser
Joined
Feb 8, 2022
Messages
78
Reaction score
154
Points
33
NullCash
1,309

Advanced Invoice Builder and Custom Number


Custom invoice PDF template on Prestashop module


Prestashop automatic generate PDF Invoice and send to customer by default template. But it is totally difficult for someone who are not developer or designer to custom Prestashop invoice template. This is why we released the module - Advanced PDF Builder. The Prestashop modules allows you to modify invoice without any technical experience. Because you can edit by editor.

Fully customizable​


In addition to a number of default settings (including a custom header/logo) and several layout fields that you can use out of the box, the plugin contains HTML/CSS based templates that allow for customization & full control over the PDF output. Copy the templates to your theme folder and you don't have to worry that your customizations will be overwritten when you update the plugin.

Modification Prestashop PDF Invoice, Delivery are never easier.​


You can add your free text, your company details, your term & condition… to Invoice & Delivery PDF. If your data is dynamic value, you can use variables. For example: invoice number, product list, total price, customer information ... You are saved a lot time with the Prestashop custom PDF invoice module.


1763057982027.png


1763058002379.png




NOTE:
This module is incredible; it even has QR code support. Unfortunately, the developer no longer works on PrestaShop, so there haven't been any updates since 2021 (at the latest, PrestaShop 1.7).

However, I, RicRey, have modified and updated the module for my personal use so that it works perfectly on PrestaShop 9 with PHP 8.4. I'm sharing this so everyone can enjoy this module. I've only tested it on PrestaShop 9, although in theory it should work on PrestaShop 8 as well.


Changed Log:


[v1.3.2] November 2025 ------------------------------------- (by RicRey)
[Compat][PS 8/9]
- Reemplazado el uso eliminado de `Tools::getBrightness()` por helpers internos
`computeBrightness()` + `getReadableTextColor()` en los overrides de factura.
- Eliminado el uso directo de `_PS_PRICE_COMPUTE_PRECISION_` (no definido en PS9) y
añadido fallback seguro basado en `PS_PRICE_DISPLAY_PRECISION`.
- Fallback de ruta para imágenes de producto en PDFs cuando la constante de
imágenes no está disponible (define condicional a `_PS_PROD_IMG_DIR_`).

[Fix]
- Factura PDF en FO/BO vuelve a renderizar sin fatales (stack `PDF->render()`).
- Miniaturas de producto en PDF: comprobación de existencia y regeneración
consistente (evita warnings/dimensiones incorrectas).
- Normalización robusta de colores: soporta `#rgb`, `#rrggbb`, `rgb()`, `rgba()` y
palabras clave básicas (`black`, `white`).

[Changed]
- `AdminGwadvancedinvoiceaboutController`: meta title y strings usando traductor
compatible con PS8/9; toolbar y media conservadas.
- Sincronización de los dos overrides `HTMLTemplateInvoice` (global y del módulo)
para evitar divergencias en futuras actualizaciones.
- Limpieza general de llamadas legacy en vistas/admin (form/tabs) para evitar
notices con PHP 8.1/8.2/8.3.

[Docs]
- CHANGELOG actualizado; notas de actualización y créditos.

Archivos principales modificados
- `modules/gwadvancedinvoice/gwadvancedinvoice.php`
- `modules/gwadvancedinvoice/controllers/admin/AdminGwadvancedinvoiceaboutController.php`
- `modules/gwadvancedinvoice/controllers/admin/AdminGwadvancedinvoiceconfigController.php`
- `modules/gwadvancedinvoice/controllers/admin/AdminGwadvancedinvoicetemplateController.php`
- `modules/gwadvancedinvoice/override/classes/pdf/HTMLTemplateInvoice.php`
- `override/classes/pdf/HTMLTemplateInvoice.php`
- `modules/gwadvancedinvoice/views/templates/admin/config/form.tpl`
- `modules/gwadvancedinvoice/views/templates/admin/config/tabs.tpl`
- `modules/gwadvancedinvoice/views/templates/admin/helpers/view/admin.tpl`
- `modules/gwadvancedinvoice/views/templates/admin/tpltemplates/base/tax-tab.tpl`
- (y TPLs de `tpltemplates/customize/*/header.tpl`, `footer.tpl`, `template.tpl`,
`styles.tpl`, `product_list.tpl` donde aplica)

Notas de actualización
- Vaciar caché: Back Office → Parámetros avanzados → Rendimiento → **Vaciar caché**.
- Si hay overrides locales adicionales de `HTMLTemplateInvoice`, aplicar el mismo
helper de brillo/precisión para mantener compatibilidad.
- Probar generación de factura desde FO y desde BO (Acciones de pedido → Ver factura).

Créditos

- Implementación y ajustes por **RicRey**.
 

Attachments

  • gwadvancedinvoice1.3.2-by-RicRey.zip
    3.1 MB · Views: 8

mandy

Well-known member
Master
Diamond
Elite
Joined
Jul 8, 2019
Messages
1,087
Reaction score
674
Points
113
NullCash
25
great thanbks for sharing this module - just what I was wanting
 

uko

Member
XNullUser
Joined
Apr 14, 2021
Messages
792
Reaction score
12
Points
18
NullCash
18
great thanbks for sharing this module - just what I was wanting
 
Top