Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Show Po Number On Invoice Rate Topic   * * * * * 1 votes

  • colleende
  • Member
  • Members
  • Join Date: 07-Nov 11
  • 45 posts

Posted 30 January 2018 - 12:30 AM #1

I have a payment method set up called "Invoice" that uses the po.tpl template, and asks for a PO Number, Name, and Position. I am trying to figure out how to show the PO number that a user entered during checkout on the invoice. I am using version 4.7.1 and have the email templates enabled so that I can edit them via admin. I clicked on Documents, Invoice, and am editing the invoice contents, but I cannot find any field that contains the PO Number. Even when I open up the actual database, I can't find the PO number in any of the tables or fields. Can someone please tell me what variable I can use to show it on the invoice? I would think it would be something in the payment variable, right?


Thank you!


  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11442 posts

Posted 30 January 2018 - 08:41 PM #2

You might see it as {{$order_info.payment_info.po_number}}.  Not sure of the syntax for the new editor.  But payment_info should be there in its entirety.  Other order fields are hard coded as to which are available.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.

  • koalar
  • Newbie
  • Members
  • Join Date: 28-Mar 18
  • 5 posts

Posted 17 December 2018 - 08:46 AM #3

Has anyone figured out how to do this with the new editor? As Colleen said, the PO Number doesn't exist as a variable to use when you expand the parent 'payment' variable. One would expect that this would be the format {{p.po_number}} but that doesn't work.


Any ideas?

  • imac
  • Head of Product
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 2074 posts

Posted 17 December 2018 - 10:52 AM #4

Hi Unfortunately it is not pissoble without some extra coding. 


What you should do is change this file: app/Tygh/Template/Document/Order/Variables/OrderVariable.php

Just add these lines:

            'payment_info' => array(
                'po_number', 'company_name', 'buyer_name', 'position'

After this code:

            'raw' => array(
                'timestamp', 'notes', 'display_subtotal', 'discount', 'subtotal_discount', 'payment_surcharge',
                'display_shipping_cost', 'total'

After this you should be able to see payment_info variable in the order_info values, like this: https://www.evernote...wP_I2DjuY1_6_VA


Just click on the required variable and it will be added to the document: https://www.evernote...wP_I2DjuY1_6_VA


Hope this will help.

Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

  • koalar
  • Newbie
  • Members
  • Join Date: 28-Mar 18
  • 5 posts

Posted 18 December 2018 - 07:58 AM #5

Awesome! That worked out great. Appreciate your assistance on this one.