Jump to content

PHP script before and after import on Prestashop


Fabrizio Carloni

Recommended Posts

Hi,
to update the products I use the internal Prestashop function "Import" with CSV file... I would like to run a php script just before the import starts and another php script when the import has finished successfully and finally rebuild search index. How can I do? The import file is AdminImportController.php but I don't know how to do this. Can you please help me?

Thank you and greetings,
Fabrizio.

Edited by Fabrizio Carloni (see edit history)
Link to comment
Share on other sites

1 hour ago, Fabrizio Carloni said:

to update the products I use the internal Prestashop function "Import" with CSV file... I would like to run a php script just before the import starts and another php script when the import has finished successfully and finally rebuild search index.

What is your skill level?

Link to comment
Share on other sites

1 minute ago, Fabrizio Carloni said:

Okay, that's also why I'm here for help. 🙂 I

I don't think that you'll get a script written for you on the base of your information.

No theme name, no php version, no domain name.

Post the file you want to change with the changes you try to do. Try them before they might even work.

Link to comment
Share on other sites

I don't want a script but help on how to do. I use Prestashop 1.7.7.5 with PHP 7.4 as a theme I use AngarTheme and as mentioned for the update of the products I use the native import of Prestashop which I think should use the file /controllers/admin/AdminImportController.php (which I am attaching). What I would like to do is run my php file just before the import and another php file of mine after the import is complete and finally rebuild the search index. How can I do it?

Thank you,
Fabrizio.

AdminImportController.php

Link to comment
Share on other sites

Sorry I didn't understand ... so there's no way to handle this process with just one click? What I want to do is automatically run my php script just before the import starts and another php script when the import is done successfully. How can I do?

Best regards,
Fabrizio Carloni.

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