Jump to content

Autoloading models


Recommended Posts

Hi

 

I am developing a module for prestahop 1.5,so far it install itself correctly and the admin controller seems to be working.I have been following this "tutorial" although I don't speak french

http://www.prestarocket.com/blog/creer-module-mvc-prestashop-1-5/

 

The admin controller is supposed to display and manage a model.I have already created the table for that model, but I am starting to suspect that the tutorial is wrong with a few things.

I have placed the model (a class extending object model in a models folder inside the module) but after a lot of debugging and diving into prestashop code,I have found that the class Autoload never looks into module folders so I'm starting to suspect that this is wrong.

 

If I am correct, Where should the php class file go? If it is in the 'classes' folder the module will not be self contained anymore, and It will require to merge its classes folder with the original PS classes folder.I am considering to release the module in the future and I want to stick to the rules and best practices, so this doesn't strike me as te best solution.

 

Any Ideas?

Link to comment
Share on other sites

×
×
  • Create New...