Jump to content

New module


Aditzu

Recommended Posts

Hi. I want to develop a new module in back-office at AdminOrders. I put my block where I want and I want to have in my tpl the name of the client who give the order.

 

I tried :

{extends file='../../admin/themes/default/template/controller/orders/helpers/view/view.tpl'}

and

{include file='../../admin112/themes/default/template/controller/orders/helpers/view/view.tpl'}

 

but all I got is errors.

 

Can someone help me. Thanks!

Link to comment
Share on other sites

hello

 

order object is defined? i mean, that you have to define also objects, not only tpl files

 

what you exactly expect? for what purposes you creating this modification?

(it's a modification or it's a module?)

Link to comment
Share on other sites

It's a module. I want tu use it for courier. And when I press generate new awb I want to auto-complete with the name of the customer.

 

I tried to define order object like this :

 

$order = new Order((int)Tools::getValue('id_order'));

 

like in AdminOrdersController but I don't have id_order. You have an idea how I can take it?

 

Thank you for your quick answer!

Link to comment
Share on other sites

I found a solution but I don;t know if is the right way to do :

 

I put in admin.themes/default/controllers/orders/helpers/view/view.tpl next lines:

 

{if Module::isInstalled("cargus")}

{include file='../../../../../../../../modules/cargus/cargus.tpl'}

{/if}

 

 

For me is ok but if someone else want to install this module he will not have these lines and the module it will not work. If someone have a better idea it will be great.

Link to comment
Share on other sites

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...