When I finished the import and got to the log details screen it would be great to have a 'run this import again' button so if I modified something, I should not go back to the template list, find the last used template and start it again
Also an 'edit template' button would be great if I need something to modify before I re-run it.
Usually I run the template several times because
1: I need something to change in the import template
2: I need something to change in the file
3: I modified something else in Joomla/VirtueMart/server (published/unpublished/deleted somehting, changed the prices, changed the server limits etc)
for the last case it would be great an option to keep the last uploaded file for the template and a 're-run import with the last uploaded file' function so I should not browse and upload the file over and over again. Bit similar to the 'delete after import' function when the source is from the server but the opposite way, 'keep file after import'
- keep
- RO CSVI
- Saturday, 22 January 2022
- Subscribe via email
0
Accepted Answer
Pending Moderation
Hello,
Yes, having a Run import again button is a good feature and has been in our mind for quite sometime. We do have it in our todo list. Will develop this feature and include it in our upcoming RO CSVI 8.3.0 version.
Instead of uploading the file for every import, you can use the option of Load from server on Source tab. With this option you save the import file on server location and RO CSVI will read the file from that location.
When I finished the import and got to the log details screen it would be great to have a 'run this import again' button so if I modified something, I should not go back to the template list, find the last used template and start it again
Yes, having a Run import again button is a good feature and has been in our mind for quite sometime. We do have it in our todo list. Will develop this feature and include it in our upcoming RO CSVI 8.3.0 version.
for the last case it would be great an option to keep the last uploaded file for the template and a 're-run import with the last uploaded file' function so I should not browse and upload the file over and over again.
Instead of uploading the file for every import, you can use the option of Load from server on Source tab. With this option you save the import file on server location and RO CSVI will read the file from that location.
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
"Run import again" - great news, thanks
Load from server is an option indeed but not always.
Let's assume I upload the products per category or manufacturer to keep my data more organised.
So I upload the first batch, use the 'run import again' button (hopefully
, upload the second batch, run import again, upload the third one but I found mistake in my config and want to import the same file again, until I get the correct result and continue with the 4. batch.
Sure it's not the most important feature of the component but keeping the last uploaded file could be also handy for debug reasons as well. Maybe this reason is more important than the button.
Load from server is an option indeed but not always.
Let's assume I upload the products per category or manufacturer to keep my data more organised.
So I upload the first batch, use the 'run import again' button (hopefully

Sure it's not the most important feature of the component but keeping the last uploaded file could be also handy for debug reasons as well. Maybe this reason is more important than the button.
Accepted Answer
Pending Moderation
Hello,
Using load from server option along with Run import again feature you should be able to use the last import file. I guess that would solve this scenario.
So I upload the first batch, use the 'run import again' button (hopefully, upload the second batch, run import again, upload the third one but I found mistake in my config and want to import the same file again, until I get the correct result and continue with the 4. batch.
Using load from server option along with Run import again feature you should be able to use the last import file. I guess that would solve this scenario.
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
ok, let's forget the button.
But the 'store last uploaded file for debug' would be interesting. It would be much more easy to check if something was modified from CSVI or from other source.
But the 'store last uploaded file for debug' would be interesting. It would be much more easy to check if something was modified from CSVI or from other source.
Accepted Answer
Pending Moderation
Hello,
I see what you are saying with the "keep the last file" but not quite sure how this is going to work. How is RO CSVI going to know what the previous file is? Let's say you upload file A and then file B, how would we know that we need to delete file A. Perhaps you have another template setup to use file A. We should also keep a record of which file has been uploaded before to delete it.
As the user you will know which files you are uploading and which ones you want to check. Do know that the "Load from server" does not have to be a file, this can also be a folder with files, so RO CSVI will import all files in that folder. If you do not set the option to delete the files after import you always have them as backup as well.
As for now, I do not see this as a feature to implement.
I see what you are saying with the "keep the last file" but not quite sure how this is going to work. How is RO CSVI going to know what the previous file is? Let's say you upload file A and then file B, how would we know that we need to delete file A. Perhaps you have another template setup to use file A. We should also keep a record of which file has been uploaded before to delete it.
As the user you will know which files you are uploading and which ones you want to check. Do know that the "Load from server" does not have to be a file, this can also be a folder with files, so RO CSVI will import all files in that folder. If you do not set the option to delete the files after import you always have them as backup as well.
It would be much more easy to check if something was modified from CSVI or from other source.You still have these files as well on your own system right?
As for now, I do not see this as a feature to implement.
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
Accepted Answer
Pending Moderation
How is RO CSVI going to know what the previous file is?
I would store it in media/com_csvi/importfiles/{template_id}.{extension of the file} or something
Do know that the "Load from server" does not have to be a file, this can also be a folder with files, so RO CSVI will import all files in that folder.
Didn't know but great feature, I'm going to use it.
If you do not set the option to delete the files after import you always have them as backup as well.
But for that you have to upload the files manually which is also a kind of upload if those files are located in your local system.
I use the 'load from server' source a lot for dynamically generated files, mostly via CLI but if the files are in your computer, it still requires a manual upload
You still have these files as well on your own system right?
Yep, if you work alone, you use one computer/server and you're organized

Some companies have 2-3-X administrators, working mixed from the office and from home computer also stored hundreds of files in their windows document folder which could be a mess.
As for now, I do not see this as a feature to implement.
Seems it's only for me, so no more push. Maybe I'll check the onBeforeImport trigger in a csvi plugin and put a JFile::copy() there. I already have some custom csvi plugins mostly for onImportComplete()

Accepted Answer
Pending Moderation
Hello,
Good idea but by storing the files we are eating up space.
Correct but it is one time upload for Load from server option. It is the same for Load from computer option and saving the files on server. Both of them needs manual upload atleast once.
Yes as of now you are the only user asking for this feature
I would store it in media/com_csvi/importfiles/{template_id}.{extension of the file} or something
Good idea but by storing the files we are eating up space.
But for that you have to upload the files manually which is also a kind of upload if those files are located in your local system.
I use the 'load from server' source a lot for dynamically generated files, mostly via CLI but if the files are in your computer, it still requires a manual upload
Correct but it is one time upload for Load from server option. It is the same for Load from computer option and saving the files on server. Both of them needs manual upload atleast once.
Seems it's only for me, so no more push. Maybe I'll check the onBeforeImport trigger in a csvi plugin and put a JFile::copy() there. I already have some custom csvi plugins mostly for onImportComplete()
Yes as of now you are the only user asking for this feature

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
Good idea but by storing the files we are eating up space.
Not too much if you store only the last one

Yes as of now you are the only user asking for this feature
Always know I am unique in some way


I checked the onBeforeImport() but it has only $options parameter and at that point we don't have $_FILE because it's already stored in the temp dir and can't have access to the current model/helper instance. Any quick hint how should I get the file we're working currently with?
Accepted Answer
Pending Moderation
Hello,
You can use $this->file->getFilename() method call to get the filename.
I checked the onBeforeImport() but it has only $options parameter and at that point we don't have $_FILE because it's already stored in the temp dir and can't have access to the current model/helper instance. Any quick hint how should I get the file we're working currently with?
You can use $this->file->getFilename() method call to get the filename.
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
Hm it throws an error, there is no $this->file, I think it works from the component, not from a plugin
I found this in the model:
$dispatcher = new RantaiPluginDispatcher;
$dispatcher->importPlugins('csvi', $this->db);
$dispatcher->trigger('onBeforeImport', $options);
So I created a class PlgCsviSavefile extends RantaiPluginDispatcher { }
Should I load something more to access the file object from the plugin? Or should I extend an other class?
I found this in the model:
$dispatcher = new RantaiPluginDispatcher;
$dispatcher->importPlugins('csvi', $this->db);
$dispatcher->trigger('onBeforeImport', $options);
So I created a class PlgCsviSavefile extends RantaiPluginDispatcher { }
Should I load something more to access the file object from the plugin? Or should I extend an other class?
Accepted Answer
Pending Moderation
Hello,
The object $this->file is not available for RantaiPluginDispatcher and so there is an error.
The $options parameter for onBeforeImport method has template ID so you can run a query and get the processing file from the database. Use the below query in PlgCsviSavefile class for onBeforeImport method and see if you can get the file from tmp directory. You can then copy the file to needed location.
Let me know if that helps.
Hm it throws an error, there is no $this->file, I think it works from the component, not from a plugin
The object $this->file is not available for RantaiPluginDispatcher and so there is an error.
I found this in the model:
$dispatcher = new RantaiPluginDispatcher;
$dispatcher->importPlugins('csvi', $this->db);
$dispatcher->trigger('onBeforeImport', $options);
So I created a class PlgCsviSavefile extends RantaiPluginDispatcher { }
Should I load something more to access the file object from the plugin? Or should I extend an other class?
The $options parameter for onBeforeImport method has template ID so you can run a query and get the processing file from the database. Use the below query in PlgCsviSavefile class for onBeforeImport method and see if you can get the file from tmp directory. You can then copy the file to needed location.
$db = JFactory::getDbo();
$templateId = $options[0]['csvi_template_id'];
$query = $db->getQuery(true)
->select($db->quoteName('processfile'))
->from($db->quoteName('#__csvi_processes'))
->where($db->quoteName('csvi_template_id') . ' = ' . (int) $templateId);
$db->setQuery($query);
$fileName = $db->loadResult();
Let me know if that helps.
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 »