Jump to content

Autoloading models


albertogomez

Recommended Posts

Hi I started same topic in a different forum so I'm just going to copypaste

 

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