# From cart to PDF quote, with no re-entry

> A B2B distributor received quote requests by email after customers reviewed their cart, then rebuilt them by hand in a spreadsheet before sending.

- Source canonique : [https://allaux.fr/en/realisations/devis-pdf-automatise](https://allaux.fr/en/realisations/devis-pdf-automatise)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## The context

Some of the store's business customers didn't order directly online: they wanted a formal quote first, with a number, a validity period and a polished layout, before raising an internal purchase order. The existing process involved copying the cart contents into a spreadsheet, manually adding the negotiated discounts, formatting it, then exporting to PDF and sending it by email. Every quote took time, and the risk of a copying error wasn't negligible, particularly when dozens of product lines were involved.

The goal was to turn a cart directly into a ready-to-send PDF quote, with no manual step in between.

## What I did

1. **Defined the expected content** — Gathered the required quote format: mandatory legal notices, validity terms, how discounts should appear, header and footer in the store's colours.
2. **Built the generation module** — A PrestaShop module able to turn the contents of a cart or an order into a structured PDF document, with its own sequential numbering.
3. **Handled validity and tracking** — Added an automatic expiry date and a tracking status showing whether a quote was converted into an order or went unanswered.
4. **Integrated with sending** — Generated and sent the PDF directly from the back office, or automatically triggered after an online quote request.

## What required the most care

- **Faithful formatting** — The PDF output needed to stay readable and consistent regardless of the number of product lines, including for very long quotes.
- **Consistency with displayed prices** — The quote pulls the exact prices and discounts calculated by that customer's pricing engine, with no parallel recalculation that could have drifted.
- **Archiving** — Every quote generated stays viewable from the back office, with its number, so the history can be traced if the customer has a question later.

## Outcome

> Sending a quote went from a several-minute manual task to instant generation from the cart, with no risk of a copying error.

## FAQ

### Can the quote be customised per customer?

Yes, the document automatically pulls in each account's own pricing terms, along with its contact details and any specific notices needed.

### Can a quote turn directly into an order?

That's a possible flow: depending on the configuration chosen, an accepted quote can trigger creation of the matching order with no further data entry.

### What happens once a quote's validity period expires?

The quote stays viewable but its status changes to flag that it's no longer valid as is, which stops an old price being honoured by mistake.

### Does this module work with a large catalogue?

Yes, generation stays fast even for quotes with a large number of lines, since the PDF is built directly from data already in the database.
