1. ekcsvi
  2. RO CSVI
  3. Tuesday, 22 September 2020
  4.  Subscribe via email
Hi

I just noticed my template is not acting the way it should... for +- 10000 products the media file ( virtuemart_medias ) contains now +500 000 lines !!!

The problem is : I just want to copy the files on the local server with the media import template and, unfortunately, it is adding lines to the media files in the database each time I run it.

What did I do wrong in the set-up ? :(
Is there a model in the documentation ?

Regards
Eric
Accepted Answer
Accepted Answer Pending Moderation
Hi Tharuna

Thank you for the explanations and quick replies !

OK for problem 1 = solved

Regarding problem 2 :
I guess I should only comment code INSIDE the function public function getProcessRecord() and leave the other functions after that right ? ( starting line 257 )

Best regards
Eric
  1. more than a month ago
  2. RO CSVI
  3. # Permalink
Accepted Answer Pending Moderation
Hello Eric,
With VirtueMart Media import, file_url is the required field. If the value in this field is matching the value in VirtueMart media table in database, image is updated else a new image row is created. The file_url field value you are importing are already in database? Post the import debug log to check. To get the debug log check How to collect debug information? document.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello

Thank you for the answer !

Let put it this way : Template Operation "product"
The media file is written before during product import so YES, the records are existing and I don't want to touch at the database files

All I would like to do simply is : Template Operation "media"
Get the distant files from CSV and write them in the local directory (Location product files) without writing anything in the database virtuemart_media

Is it possible ?

Regards
Eric
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Eric,
Template Operation "media"
Get the distant files from CSV and write them in the local directory (Location product files) without writing anything in the database virtuemart_media

Is it possible ?

With RO CSVI import we first download images and update media table based on file_url field. It is not possible to download only images without writing to database. But you can create an override for media import where you can download the images and avoid the update of database.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hi Tharuna

We'll get there ! ;-)

I created the override following the explications and put the file in the template ( this is indeed the right one )
administrator/templates/isis/html/com_csvi/com_virtuemart/model/import/mediacustom.php

So far I didn't modified the file except the class Mediacustom

My problems :
1- The new operation is not showing in the CSVI template
2- I don't know what I need to modify in mediacustom.php, could you inticate this to me please ?

Regards
Eric
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Eric,
1- The new operation is not showing in the CSVI template

Override file will not be listed in Operations but you will see it under Override field under Operations(See screenshot). If you do not see this field click on Advanced button on top right corner.

2- I don't know what I need to modify in mediacustom.php, could you inticate this to me please ?

In Media file the method processMedia at line no 184 is where the image processing happens which also includes image download and writing it to local server. You can leave this method and the rest of the code under it for storing to media table can be removed or commented.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello Eric,
Regarding problem 2 :
I guess I should only comment code INSIDE the function public function getProcessRecord() and leave the other functions after that right ? ( starting line 257 )

Yes you need to leave the rest of the functions and comment lines after processMedia method in getProcessRecord. Lines 187 to 233 should be commented.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hi Tharuna

Working fine !
Thank you very much !

Eric
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello Eric,
Glad to know that override worked for you.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 8
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!