Jump to content

Inserting a barcode into the delivery slip


Recommended Posts

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 by TempleClause (see edit history)
Link to comment
Share on other sites

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...