Jump to content

Add extra fee / small order surcharge (PDF / invoice) in PrestaShop


Recommended Posts

Hello everyone,

I’m working with PrestaShop 1.7.8 and I’d like to add an extra fee (small order surcharge) that should appear below the shipping cost in the invoice PDF.

I want to achieve this without using any class overrides — ideally through hooks or service decoration.

Question:
What is the best way to display an additional fee (a new total line) under the shipping cost in the invoice PDF, without overriding PDFInvoice or editing invoice.tpl?
Is there any official hook, filter, or service approach that allows injecting new rows into the totals section?

Thank you in advance for any hints or examples!

Best regards

Link to comment
Share on other sites

Hi,

thanks a lot for the quick reply. I actually expressed myself incorrectly earlier. What I’m trying to implement is a small order surcharge.

Everything works fine so far — the fee is added correctly, the amounts update as expected — but I’m struggling with displaying the extra line in the PDF totals section. I’d like to show it as a separate cost item in the invoice (PDF), similar to shipping or tax.

However, I can’t get it to appear via hooks alone. I’ve tried several PDF and order-related hooks, but it seems impossible without editing the .tpl file. I’d prefer not to modify the template directly for maintainability reasons.

Is there a known solution or best practice to inject an additional total line into the PDF (invoice) using only hooks or the presenter layer, without touching the TPL?

Thanks in advance!

Link to comment
Share on other sites

Hello El Patron,

Thank you for your reply.

Right now, the small order surcharge is stored in its own database table that belongs to the module ps_small_order_surcharge.

When we set the minimum order amount and the surcharge value in the module’s Back Office, those values are saved directly into that table DB.

 

Thank you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...