Categories

How to run own script?

Please note! This option is not available anymore from nopCommerce 4.00 

To plugin is added text file ScriptPDFPlugin.txt in which you may find sample code. You may find it also below.

Please note! If you want run own scripts, first you should enable it. To do it, please go to

Configuration → Settings → All Settings (Advanced) and use filter to find htmlpdfsettings.usescript

all settings

Change value to True

change value

Sample script included to plugin

script example code

If to your invoice you add text Discount, with token {OrderDiscount} you will get information about discount used. Yes, indeed, but how it will be looked like, if order would be without any discount?

Just let me show it how it is working without this script.

example of script at invoice

It is working, but it is not looking well. Now, if I will turn script on you will see order:

example of working script at the invoice

This way you get tool with unlimited possibilities.

 

back to top