TempleClause Posted February 28, 2017 Share Posted February 28, 2017 (edited) Hey there, I'm pretty new with prestashop and need some advice on how I should do things. My goal: Insert a barcode into the delivery slip document which is created in php code. What would be the best and cleanest approach to do this? I figured out I could create a new Controller in the /classes/controller folder which extends AdminController. In there I could create a static function which does the job: <?php class MyController extends AdminController { public static function myFunction($test){ return "hello world"; } } ?> From the delivery-slip.tpl file I could then call the function like this: <p> Hello World! {MyControllerCore::myFunction()} </p> But I'm very unsure if this is the right way to do things. What would you guys recommend? Thanks for pointing me in the right direction :-) Edited February 28, 2017 by TempleClause (see edit history) Link to comment Share on other sites More sharing options...
Poulsgaard Posted February 14, 2019 Share Posted February 14, 2019 Did you ever resolve this issue? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now