Jump to content

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

Add Sales Rep (Issuer First Name) To Invoice.tpl Rate Topic   - - - - -

 
  • Ed Newman
  • Advanced Member
  • Members
  • Join Date: 02-Mar 13
  • 128 posts

Posted 11 July 2019 - 03:31 PM #1

Hi, I am trying to add the sales rep to each invoice.  Version 4.3.

 

I modified the invoice.tpl in the design\backend\mail\templates\orders folder to add:

 

            <tr valign="top">
                        <td style="font-size: 12px; font-family: verdana, helvetica, arial, sans-serif; text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{__("sales_rep")}:</td>
                        <td style="font-size: 12px; font-family: Arial;">{$user_data.firstname}</td>
                    </tr>
 
which works but it is not pulling the issuer information from the database.  I am guessing I need some more code or need to add something like this
 
 {include file="views/order_management/components/issuer_info.tpl" user_data=$order_info.issuer_data}
 
to the template, but not sure where to add it.  Anyone familiar with this?

Ed Newman
Dark Storm Industries LLC
www.dark-storm.com


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19389 posts

Posted 12 July 2019 - 05:54 AM #2

Please make sure that the issuer_data array is not empty using the following code

{$order_info.issuer_data|fn_print_r}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Ed Newman
  • Advanced Member
  • Members
  • Join Date: 02-Mar 13
  • 128 posts

Posted 15 July 2019 - 08:38 PM #3

 

Please make sure that the issuer_data array is not empty using the following code

{$order_info.issuer_data|fn_print_r}

 

Returns the following data for an order I was testing on.  So the data is there.

 

Array
(
[user_id] => 3922
[user_login] => user_3922
[company_id] => 1
[firstname] => Harry
[lastname] => Belechto
[email] => harry@dark-storm.com
[user_type] => A
)

I also tried {$issuer_data.firstname} but that did not work.


Ed Newman
Dark Storm Industries LLC
www.dark-storm.com


 
  • Ed Newman
  • Advanced Member
  • Members
  • Join Date: 02-Mar 13
  • 128 posts

Posted 15 July 2019 - 08:40 PM #4

Got it to work.  Used  {$order_info.issuer_data.firstname}


Ed Newman
Dark Storm Industries LLC
www.dark-storm.com