VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: RhymeGuy on November 14, 2014, 13:08:53 PM

Title: Cannot add custom function inside invoice_items.php
Post by: RhymeGuy on November 14, 2014, 13:08:53 PM
Hi,

Why its not possible to add function inside invoice_items.php?

For example (just an example) if I have function like:
function myFunction($a, $b, $c) {
//do something like
$sum = $a + $b + $c;
}

and if I add it to the invoice_items.php (or mail_html.php), the it will cause the problems when I want to change order status (I noticed that it will also cause errors when ordering). myFunction can be anything, even simple echo 'Hello world.';