Jump to content

Write shipping fee depending on payment method on invoice.tpl


Recommended Posts

Hi,

 

I'm having some trouble with a little coding part on invoice.tpl. For PrestaShop wizards this should be simple, please help.

 

There are 2 scenarios:

1. If clients choose Bank Wire or Credit Card payment, then they pay to my store the products + shippment total. In this case the invoice should have the shipping fee included. 

2. If they choose COD payment the invoice should have only products total, without shipping, because the pay the shipping fee to the courier.  

 

Can i include an {if} in the invoice.tpl ? 

 

That part of the code that should be updated (i guess):

{if $order_invoice->total_shipping_tax_incl > 0}
<tr style="line-height:5px;">
<td style="text-align: right; font-weight: bold">{l s='Shipping Cost' pdf='true'}</td>
<td style="width: 17%; text-align: right;">
{if $tax_excluded_display}
{displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_excl}
{else}
{displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_incl}
{/if}
</td>
</tr>
 
Thank you!
Link to comment
Share on other sites

Hi,

 

Thanks for advice, i have solved the problem in another way. I have changed bankwire module, credit card payment module and COD module (validation.php and payment.php) to show only the products price on the validation page. 

 

Now all the invoices i send to the clients are just for the products at my store, and the courier takes care of invoicing the delivery fee.  

 

Thank you,

Vlad Grigore

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...