At this point, we have a DB request (sometimes almost the same request) in different files of the module:
mymodcomments.php. So it might be a good time to create the
MyModComment object model. Create a directory named
classes in your module's directory and place a file named
MyModComment.php in it.
The naming convention of PrestaShop is as follows:
Set the same name for the file and class
Use CamelCase for the name
Set the name in singular
The name should match the name of the table in the database
The definitions array is pretty easy to read; you have to perform the following steps (see the upcoming code example):
Set the database table related to the object; in our case...