Cant get a basic module to run

Hi there i am new to oxid and read a lot of docu … now i wanted to try what i know but cant find my mistake i hope u can help me … here what i did :

i wrote a module called test.php located in modules =>


class test extends test_parent { 
        public function testing() 
        { 
            echo "yay it works"; 
        } 
    } 

in the modules settings i got


oxorder => invoicepdf/myorder => test

the function call in the order.tpl with


[{$oView->testing()}]

the error message is


Function 'testing' does not exist or is not accessible! (order)

ty for you time and help

ok i found one mistake $oView is the wrong object for calling the method … can any one tell me whats the right object ?

Hi,

don’t really get your point: What do you want to alter, the order view? Then the order view would be the right class to override. In this case, your module entry in admin is wrong, innit?
oxorder (the class to be overwritten) => invoicepdf (the folder your new module is situated)/myorder (your new module).

Regards

hi,
you are trying to extend “order” view, so in modules write this:


order => test

but if you want to extend oxorder and it is already has the module write this in module config:


oxorder => invoicepdf/myorder&test

as you can see, you have to write ampersand sign here for over extending classes

order => test
whith
[{$oView->testing()}]

did it ty