Jump to content

Override an admin tpl from module.


Recommended Posts

I wrote a basic modification which employs the override system and requires small alterations to the database. You can see it here: http://www.prestasho...m-quantity-mod/

I would much prefer to offer it as module due to the automated install/uninstall process.

Following the Developers Guide, I wrote a basic module which mostly works, but have hit a couple of problems..


The module installs without error. The database is updated and the contents of both the class and controller files are written to the /override directory.

However there is also a modified tpl file which should end up in /override/controllers/admin/templates/products/ - it is never written.

Should I not do it this way, or should a different path be used?

I can manually upload the tpl file and everything works as intended.


The second issue comes about when uninstalling the module.

Again, no error is shown. The database is updated and the /override/controllers file content is removed, however only the first few lines of the /override/classes file is deleted. Obviously this needs user intervention to remove the left over code.

Is there some coding convention which must be followed to ensure the uninstall works correctly?


I can generally nut things out by myself but these 2 issues have me stumped and I really couldn't find an answer here on the forums. Any help would be appreciated.


Regards, Holspeed

Edited by Holspeed (see edit history)
Link to comment
Share on other sites

Seems my second issue is actually a bug: http://forge.prestas...owse/PSCFV-4627

I'd prefer to not release the module with a bug so an alternative (and probably more correct) method is needed - any pointers here?


As for the first problem.. Surely someone knows how to set an override file for an admin tpl when installing a module?


As before, any help is appreciated.

- Holspeed

Edited by Holspeed (see edit history)
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...