Jump to content

How to add new fields to invoice.tpl like fees?


chamanx
 Share

Recommended Posts

Hello to everyone,

 

First of all, sorry if this is already answered but i've been lookng for the answer for days with no success. I'd like someone to breefly explain how prestashop works when generating the invoice.

 

What i want to do is to add fees depending on the payment method, and indicating this concept in the invoice instead of adding it to shipping or the price of the item. So, what i am investigating is how presta works when generating the orders and invoices.

 

In the file invoice.tpl i have some fields like total_products_tax_included and many others. I guess these fields come from Order.php, and somehow, the payment module you use (paypal, cash on delivery, bank transfer, etc) also interacts with the order and the invoice. So i just need to know:

 

1) In which file can i find the code that indicates the payment method that the customer has chosen?

2) How can i add a new variable for the invoice? Do i have to add a new variable to the order too? If i have this variable in paypal.php or cashondelivery.php, how does it connect with the invoice?

 

I just need to know how i can start working on this problem, a short explanation of these concepts because although it seems easy is complicated :)

 

In any case, thank you in advance.

Share this post


Link to post
Share on other sites

  • 7 years later...

Hello, sorry, no solution, just the same question.

( 8 years later) In case the post starte or someone  else knows more, pls let me know.

Want to add paypal fees to the invoice when paypal is chosen as payment methode.

 

Thanks in  advance !

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More