classes/MyModComment.php file, add the shop ID just below the comment ID:
Then, add it in the fields list of the
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
If you don't remember how an
ObjectModel class works, please refer to Chapter 5, Front Controllers, Object Models, and Overrides.
Now, open the
controllers/hook/displayProductTabContent.php controller and search for the
processProductTabContent method where you’re doing the comment’s insertion in the database with your
ObjectModel class. You just have to set the
id_shop field before calling the
add method of your object:
$MyModComment->id_shop = (int)$this->context...