[Skip to main content](#vessel-content)

#   Customisation of PDF Invoice

##

- **[DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")**
- [![DavidThor's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30643-davidthor "View DavidThor's Profile") Topic Author
- [ Offline](/forum/user/30643-davidthor)

Less More

- Posts: 43
- Thank you received: 0
-
-

11 years 3 months ago [\#209241](#209241) by [DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")  *[Customisation of PDF Invoice](/forum/29-payment-methods/878332-customisation-of-pdf-invoice#209241 "-- HikaShop version -- : 2.5.0  Hi,  I'm trying to add bank account information to the attached PDF Invoice, but the 'echo $payment-&gt;payment&#95;params-&gt;information;' is not adding the information to the invoice. I have the same line in the Order Creation Notification Email and that works just fine. I've also tried to replace the last echo line with the second code block below, but that doesn't work either.  Any idea where I'm going wrong?  Thanks, David")* was created by *[DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")*

-- HikaShop version -- : 2.5.0

Hi,

I'm trying to add bank account information to the attached PDF Invoice, but the 'echo $payment-&gt;payment_params-&gt;information;' is not adding the information to the invoice. I have the same line in the Order Creation Notification Email and that works just fine. I've also tried to replace the last echo line with the second code block below, but that doesn't work either.

Any idea where I'm going wrong?

Thanks,
David

Code:

&lt;?php if(!isset($order-&gt;order_invoice_number)) $order-&gt;order_invoice_number = $order-&gt;order_number; echo JText::_('DATE').': '.hikashop_getDate($order-&gt;order_created,'%d %B %Y ').'&lt;br /&gt;'; echo JText::_('INVOICE').': '.$order-&gt;order_invoice_number.'&lt;br /&gt;'; echo JText::_('ORDER_NUMBER').': '.$order-&gt;order_number.'&lt;br /&gt;'; if (!empty($pluginsShipping)) echo JText::_('HIKASHOP_SHIPPING_METHOD').': '.$pluginsShipping-&gt;getName($order-&gt;order_shipping_method, $order-&gt;order_shipping_id).'&lt;br /&gt;' ; if(!empty($pluginsPayment)) echo JText::_('HIKASHOP_PAYMENT_METHOD').': '.$pluginsPayment-&gt;getName($order-&gt;order_payment_method, $order-&gt;order_payment_id).'&lt;br /&gt;&lt;br /&gt;'; echo $payment-&gt;payment_params-&gt;information; ?&gt;

Code:

$paymentClass = hikashop_get('class.payment'); $payment = $paymentClass-&gt;get($data-&gt;order_payment_id); $payment-&gt;payment_params = unserialize($payment-&gt;payment_params); echo $payment-&gt;payment_params-&gt;information;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzgzMzItY3VzdG9taXNhdGlvbi1vZi1wZGYtaW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

11 years 3 months ago [\#209247](#209247) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Customisation of PDF Invoice](/forum/29-payment-methods/878332-customisation-of-pdf-invoice#209247 "-- HikaShop version -- : 2.5.0  Hi,  I'm trying to add bank account information to the attached PDF Invoice, but the 'echo $payment-&gt;payment&#95;params-&gt;information;' is not adding the information to the invoice. I have the same line in the Order Creation Notification Email and that works just fine. I've also tried to replace the last echo line with the second code block below, but that doesn't work either.  Any idea where I'm going wrong?  Thanks, David")*

Hi,

As you can see in the invoice.php file, the data of the order is stored in the $order variable. So instead of: Code:

$paymentClass = hikashop_get('class.payment'); $payment = $paymentClass-&gt;get($data-&gt;order_payment_id); $payment-&gt;payment_params = unserialize($payment-&gt;payment_params); echo $payment-&gt;payment_params-&gt;information;

you want to use: Code:

$paymentClass = hikashop_get('class.payment'); $payment = $paymentClass-&gt;get($order-&gt;order_payment_id); $payment-&gt;payment_params = unserialize($payment-&gt;payment_params); echo $payment-&gt;payment_params-&gt;information;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzgzMzItY3VzdG9taXNhdGlvbi1vZi1wZGYtaW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")**
- [![DavidThor's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30643-davidthor "View DavidThor's Profile") Topic Author
- [ Offline](/forum/user/30643-davidthor)

Less More

- Posts: 43
- Thank you received: 0
-
-

11 years 3 months ago [\#209267](#209267) by [DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")  Replied by *[DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")* on topic *[Customisation of PDF Invoice](/forum/29-payment-methods/878332-customisation-of-pdf-invoice#209267 "-- HikaShop version -- : 2.5.0  Hi,  I'm trying to add bank account information to the attached PDF Invoice, but the 'echo $payment-&gt;payment&#95;params-&gt;information;' is not adding the information to the invoice. I have the same line in the Order Creation Notification Email and that works just fine. I've also tried to replace the last echo line with the second code block below, but that doesn't work either.  Any idea where I'm going wrong?  Thanks, David")*

Hi,

Tried, but still doesn't work. Any other idea?

//David

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzgzMzItY3VzdG9taXNhdGlvbi1vZi1wZGYtaW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

11 years 3 months ago [\#209303](#209303) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Customisation of PDF Invoice](/forum/29-payment-methods/878332-customisation-of-pdf-invoice#209303 "-- HikaShop version -- : 2.5.0  Hi,  I'm trying to add bank account information to the attached PDF Invoice, but the 'echo $payment-&gt;payment&#95;params-&gt;information;' is not adding the information to the invoice. I have the same line in the Order Creation Notification Email and that works just fine. I've also tried to replace the last echo line with the second code block below, but that doesn't work either.  Any idea where I'm going wrong?  Thanks, David")*

Hi,

I don't see why that would work.
It must come from the way you added it to the invoice.
could you provide the code with a few lines before and after so that we can see where you put it in your invoice.php file ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzgzMzItY3VzdG9taXNhdGlvbi1vZi1wZGYtaW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")**
- [![DavidThor's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30643-davidthor "View DavidThor's Profile") Topic Author
- [ Offline](/forum/user/30643-davidthor)

Less More

- Posts: 43
- Thank you received: 0
-
-

11 years 3 months ago -  11 years 3 months ago [\#209347](#209347) by [DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")  Replied by *[DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")* on topic *[Customisation of PDF Invoice](/forum/29-payment-methods/878332-customisation-of-pdf-invoice#209347 "-- HikaShop version -- : 2.5.0  Hi,  I'm trying to add bank account information to the attached PDF Invoice, but the 'echo $payment-&gt;payment&#95;params-&gt;information;' is not adding the information to the invoice. I have the same line in the Order Creation Notification Email and that works just fine. I've also tried to replace the last echo line with the second code block below, but that doesn't work either.  Any idea where I'm going wrong?  Thanks, David")*

Thanks!

Full code below. Essentially the same as the original. I'm not sure if it makes any difference, but I'm using Hika Market as well.

//David

Code:

Code removed by a moderator

Last edit: 11 years 3 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzgzMzItY3VzdG9taXNhdGlvbi1vZi1wZGYtaW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

11 years 3 months ago [\#209370](#209370) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Customisation of PDF Invoice](/forum/29-payment-methods/878332-customisation-of-pdf-invoice#209370 "-- HikaShop version -- : 2.5.0  Hi,  I'm trying to add bank account information to the attached PDF Invoice, but the 'echo $payment-&gt;payment&#95;params-&gt;information;' is not adding the information to the invoice. I have the same line in the Order Creation Notification Email and that works just fine. I've also tried to replace the last echo line with the second code block below, but that doesn't work either.  Any idea where I'm going wrong?  Thanks, David")*

Try with that code instead:
$paymentClass = hikashop_get('class.payment');
$payment = $paymentClass-&gt;get($order-&gt;order_payment_id);
echo $payment-&gt;payment_params-&gt;information;

I've tested it on my end and it works fine:
[ take.ms/9QGD9](http://take.ms/9QGD9)

The following user(s) said Thank You: [DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzgzMzItY3VzdG9taXNhdGlvbi1vZi1wZGYtaW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")**
- [![DavidThor's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30643-davidthor "View DavidThor's Profile") Topic Author
- [ Offline](/forum/user/30643-davidthor)

Less More

- Posts: 43
- Thank you received: 0
-
-

11 years 3 months ago [\#209388](#209388) by [DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")  Replied by *[DavidThor](/forum/user/30643-davidthor "View DavidThor's Profile")* on topic *[Customisation of PDF Invoice](/forum/29-payment-methods/878332-customisation-of-pdf-invoice#209388 "-- HikaShop version -- : 2.5.0  Hi,  I'm trying to add bank account information to the attached PDF Invoice, but the 'echo $payment-&gt;payment&#95;params-&gt;information;' is not adding the information to the invoice. I have the same line in the Order Creation Notification Email and that works just fine. I've also tried to replace the last echo line with the second code block below, but that doesn't work either.  Any idea where I'm going wrong?  Thanks, David")*

Thanks! Perfect!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzgzMzItY3VzdG9taXNhdGlvbi1vZi1wZGYtaW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.070 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
