Add Something To Invoice (Best Approach)

hello,

how to add something to the invoice like a variable created in a php or a link to a image....

what is the best approach

my changes addon? invoice editor?

thank you in advance

Can't tell you with the new editor. But for templates, the best approach is to set a variable in the controller as in:

Registry::get('view')->assign('my_var', $my_value)

Then {$my_var} will contain what was in $my_value in your template. If you set this to html code, you will probably want to use {$my_var nofilter} so the html is not escaped.

I do not know how to get $my_var to be a selectable variable in the new email/document editor. But am interested to know for future reference. I'd asked for an export/import function so that addon developers could create documents, emails and variables and then export them for distribution and importing them in the addon install, but was told it wasn't needed.

hello,

how to add something to the invoice like a variable created in a php or a link to a image....

what is the best approach

my changes addon? invoice editor?

thank you in advance

Do you use new document editor or old email templates?

Hello,

I am using multi-vendor 4.6.2, i was trying to add some variable in the suppliers invoice document ,

but i am unable to assign a value to that variable , can someone help me with the best possible way

to add the variable in suppliers invoice .

Thank you,

Hello,

I am using multi-vendor 4.6.2, i was trying to add some variable in the suppliers invoice document ,

but i am unable to assign a value to that variable , can someone help me with the best possible way

to add the variable in suppliers invoice .

Thank you,

So what template editor do you use?

So what template editor do you use?

hello,

I have added a new variable in the invoice but dont know from where i should pass the value to this variable ,

may be i was passing it from the wrong function , please suggest me with the solution

http://prntscr.com/h88ai4

Thank you,

hello,

I have added a new variable in the invoice but dont know from where i should pass the value to this variable ,

may be i was passing it from the wrong function , please suggest me with the solution

http://prntscr.com/h88ai4

Thank you,

For the new editor, please check the Adding Variables to the List of Available Variables section here

http://docs.cs-cart.com/4.6.x/developer_guide/core/documents/documents.html