cikcak Posted February 25, 2015 Share Posted February 25, 2015 (edited) Hey, I cant figure out how to use this in my module. I would like to override or add additional block in orders/_product_line.tpl. Im looking at prestashop documentation: Using helpers to overload a back-office template ,but how to use this?? {extends file="helpers/options/options.tpl"} {block name="after"} <p style="color:red;text-align:center;">Block after : add a text after the form</p>{/block} override/controllers/admin/templates/orders/: overloading folder for templates that already exist in admin/themes/default/template/controllers/orders/So I should put _product_line.tpl file in modules/mymodule/override/controllers/admin/templates/orders/ with only this code , but what exactly I must extends? {extends file="_product_line.tpl"} ? I have tried to copy a orginal _product_line.tpl file add manually code to file and put it to: mymodule/override/controllers/admin/templates/orders but nothing.. Ech, I really need to solve this. Thanks for any help or code example, advice. Best regards! Edited March 4, 2015 by cikcak (see edit history) Link to comment Share on other sites More sharing options...
Hasher Posted March 5, 2015 Share Posted March 5, 2015 Have someone figured it out? Link to comment Share on other sites More sharing options...
doekia Posted March 5, 2015 Share Posted March 5, 2015 Your module need not to override thru the override folder. Your module define its own views/admin/... structure and extends or superceed the native template... Within your controller you just access your template first Link to comment Share on other sites More sharing options...
Hasher Posted March 5, 2015 Share Posted March 5, 2015 (edited) Thank you for clarifying that. Suppose I'd like to override: presta\admin1234\themes\default\template\helpers\list\list_footer.tpl I've moved my list_footer.tpl to: modules\[my_module]\views\templates\admin\helpers\ and installed my module, but nothing changes. What did I do wrong? My mistake, I've discovered here the list_footer.tpl should be placed in: modules\[my_module]\views\template\admin\_configure\helpers\list\ but after reinstalling the module still no changes ;/ Edited March 5, 2015 by Hasher (see edit history) Link to comment Share on other sites More sharing options...
doekia Posted March 5, 2015 Share Posted March 5, 2015 Well I am confused ... dont you need some controller to "energize" your changes? I mean you plan to add something on the page this something need data? where they come from? If all you need is some design changes, you don't need a odule at all and in that case, yes you override the admin theme thru the override folder Link to comment Share on other sites More sharing options...
Hasher Posted March 5, 2015 Share Posted March 5, 2015 Yes, at the moment all I need is add some minor design changes, but I need to wrap it up in a module (manager's idea, can't change that). How can I do it? 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