Jump to content

Prestashop 1.6.1.12 how to figure out what is putting content in {$HOOK_DISPLAY_PDF}


Recommended Posts

Hi All,

 

I use pretashop 1.6.1.12

on all my invoices the {$HOOK_DISPLAY_PDF} is showing a box with this content:

 

---------------------------------------------------------------------------

Bank name
Account holder name
IBAN
BIC
Amount due / currency
Payment due date
reference
Powered by

---------------------------------------------------------------------------

 

I cannot figure out where this information is comming from, so I cannot show something usefull in there.

 

Do anybody have any suggestion on how i figure this out ?

 

Regards

 

OhmegaStar

Link to comment
Share on other sites

Hi All,

 

I use pretashop 1.6.1.12

on all my invoices the {$HOOK_DISPLAY_PDF} is showing a box with this content:

 

---------------------------------------------------------------------------

Bank name

Account holder name

IBAN

BIC

Amount due / currency

Payment due date

reference

Powered by

---------------------------------------------------------------------------

 

I cannot figure out where this information is comming from, so I cannot show something usefull in there.

 

Do anybody have any suggestion on how i figure this out ?

 

Regards

 

OhmegaStar

It's a PayPal hook (modules-->PayPal-->paypal.php). Don't ask me why this is  in all the invoices but you can do this:

 

Starts on line 2620 for me:

$tab = '';
 
/*$tab = '<table style="border: solid 1pt black; padding:0 10pt">
    <tr><td></td><td></td></tr>
    <tr><td><b>'.$this->l('Bank name').'</b></td><td>'.$information['recipient_banking_instruction']['bank_name'].'</td></tr>
    <tr><td><b>'.$this->l('Account holder name').'</b></td><td>'.$information['recipient_banking_instruction']['account_holder_name'].'</td></tr>
    <tr><td><b>'.$this->l('IBAN').'</b></td><td>'.$information['recipient_banking_instruction']['international_bank_account_number'].'</td></tr>
    <tr><td><b>'.$this->l('BIC').'</b></td><td>'.$information['recipient_banking_instruction']['bank_identifier_code'].'</td></tr>
    <tr><td></td><td></td></tr>
    <tr><td><b>'.$this->l('Amount due / currency').'</b></td><td>'.$information['amount']['value'].' '.$information['amount']['currency'].'</td></tr>
    <tr><td><b>'.$this->l('Payment due date').'</b></td><td>'.$information['payment_due_date'].'</td></tr>
    <tr><td><b>'.$this->l('reference').'</b></td><td>'.$information['reference_number'].'</td></tr>
    <tr><td></td><td></td></tr>
</table>';*/
        return $tab;
    }
}

and next, in orders, invoices you can add free legal text.

 

I hope I have solved your problem!

Link to comment
Share on other sites

instead of changing the code, you can go to the back office modules > position page, filter by Paypal module, locate the displayPDFInvoice position, and then remove Paypal from it.

 

alternatively you should contact the author of the Paypal module and let them know that they need to fix their module, so that it only displays relevant information on the invoice

1) when the paypal module is actually used

2) when the payment method used by the customer was actually a bank account

Link to comment
Share on other sites

instead of changing the code, you can go to the back office modules > position page, filter by Paypal module, locate the displayPDFInvoice position, and then remove Paypal from it.

 

alternatively you should contact the author of the Paypal module and let them know that they need to fix their module, so that it only displays relevant information on the invoice

1) when the paypal module is actually used

2) when the payment method used by the customer was actually a bank account

Thank you, Unhooking is what I want.

And yes its a real strange hook to apply indiscriminatingly,

 

/OhmegaStar

Link to comment
Share on other sites

  • 1 year later...
5 hours ago, sunilm said:

With out unhook can we display the records there. I mean to say i want to display 

Bank name

Account holder name

IBAN

BIC

Where can i set the details to display here.?

I assume this is the bankwire payment module you are using?

Link to comment
Share on other sites

6 hours ago, sunilm said:

With out unhook can we display the records there. I mean to say i want to display 

Bank name

Account holder name

IBAN

BIC

Where can i set the details to display here.?

You cannot add anything there, this is a fault from paypal module. Also if you are using the module bankwire and configured all fields there, it will not fill this useless block. So, best way is to comment the lines in the pdf/invoice.tpl as written below

open with notepad on FTP the file /pdf/invoice.tpl

arround about line 129 find

<!-- Hook -->
	{if isset($HOOK_DISPLAY_PDF)}

comment the lines as showing:

<!--
	<tr>
		<td colspan="2">&nbsp;</td>
		<td colspan="10">
			{$HOOK_DISPLAY_PDF}
		</td>
	</tr>
-->

Save the file to your FTP on same place. Delete smarty cache. This box will than disappear ON NEXT INVOICE !! For invoices already created the box still remain there.

Unhook I think is not a good solution, perhaps you will have problems when you need to give money back and write a slip. I haven't tested, but I can imagine that the hook has also other functions.

Link to comment
Share on other sites

With out unhook can we display the records there. I mean to say i want to display 

Bank name

Account holder name

IBAN

BIC

Where can i set the details to display here.?

 

Note: Actually none of the payment module the IBAN details coming..  I dont think it is any use of the Prestashop. 

Link to comment
Share on other sites

@sunilm This is already answered one post before yours ! There is no function behind for to use this block.

On 31.3.2018 at 2:36 PM, selectshop.at said:

You cannot add anything there, this is a fault from paypal module. Also if you are using the module bankwire and configured all fields there, it will not fill this useless block.

 

 

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