Hi Tharuna!
After the import I apparently need to pass some informations to the shop component by executing some php to pass stock and price to the shop (the developer says on after save) - is that possible somehow?
Thanks,
Elisa
- elisa
- RO CSVI
- Sunday, 19 June 2022
- Subscribe via email
0
Accepted Answer
Accepted Answer
Pending Moderation
Hello Elisa,
There is actually a trigger available when the complete import is finished a trigger is called OnImportComplete. Attached is a sample plugin that you can add your code to and it should do what you are asking for. This installs like a regular Joomla plugin.
There is actually a trigger available when the complete import is finished a trigger is called OnImportComplete. Attached is a sample plugin that you can add your code to and it should do what you are asking for. This installs like a regular Joomla plugin.
Attachments (1)
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
- more than a month ago
- RO CSVI
- # Permalink
Accepted Answer
Pending Moderation
Hello Elisa,
It is not possible to run a specific code after import in RO CSVI. Only way I can think here is that you can add import as a cron job and run at a specific time. You can also add the PHP code you want to run as a cron job which will run after the import. That way import and your PHP code will run next to next. But you should set your PHP code cron time in such a way that it run after import is finished.
See if that would help.
It is not possible to run a specific code after import in RO CSVI. Only way I can think here is that you can add import as a cron job and run at a specific time. You can also add the PHP code you want to run as a cron job which will run after the import. That way import and your PHP code will run next to next. But you should set your PHP code cron time in such a way that it run after import is finished.
See if that would help.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Hi Roland,
on onImportComplete how can I get the ids of the articles that just have been imported?
thanks,
Elisa
on onImportComplete how can I get the ids of the articles that just have been imported?
thanks,
Elisa
Accepted Answer
Pending Moderation
Hello Elisa,
The function onImportComplete gets details of template settings as argument and not the details of the records imported. In RO CSVI content import the field modified is updated with current date if the field is not available in import file. You can write a query to get the records modified based on the date imported to get the article IDs.
The function onImportComplete gets details of template settings as argument and not the details of the records imported. In RO CSVI content import the field modified is updated with current date if the field is not available in import file. You can write a query to get the records modified based on the date imported to get the article IDs.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »