i have 2 modules created myself. each has its own database, these 2 modules are for product page. they have there own tabs in product page .. when i click on the first module tab in the product page . on the right hand side it shows a text field named directory name where i enter the directory name myself and i save it. This is properly getting saved in database with id = 1 and directory name = "directory name i typed" this is done for first module which i have created
for the second module. the right hand side contains the same fields , in the product page i select the second module tab .and on the right hand side. i enter the directory name as i did for the first module..this is getting saved in database with id = 2 and directory name = "directory name i typed for second module"
the problem is the id value of the first module is proper i.e is "1" but for the second module when saved. this has its own database table. its getting incremented to "2" for as i know the id value should be the same for both the modules when saved once ..but for the second module it s getting incremented to "2"
Can any one tell me what is causing this problem
More info: i,m using a hook to save the data from the modules into the database .. hook is triggered when product page is updated. and also the hook which is used in both the modules have same name
My english is bad so I think its the reason why I understand your problem :D
First of all, I know it is not the good solution but what I would do to save time.
I would copy overrided product.php content with php function file_get_contents and extend this file with additional "extra field". Other thing, a few weeks ago, Prestashop noticed that now u can override module files! So other way - override first module files and add additional field. To my mind, this solution pretty good.
First module works without any problems and if second module installed it`s override your first module. After uninstall second module - you remove this module additional field.