1. Donnerflug
  2. RO CSVI
  3. Tuesday, 17 September 2019
  4.  Subscribe via email
Good morning Tharuna,

I have a bit trouble with adding of custom fields to a product. For wineries we need a lot of of custom fields which are not always used. Depending on the product we need more or less fields to add.

When using "standard" import procedure with the standard "field name" and setting "use file for configuration = YES" works fine. Only fields which are present in the KML are imported.

However we are using the "your field" option and all files are created from ERP with these names. Changing the names in ERP would be a hard job! When doing import with the above mentioned configuration, CSVI doesn't recognize the "your field"- names as field. When doing import with "use file for configuration = NO" all assigned template fields to the template are added to the product - empty or not. So we have a lot of custom fields which are not in use with the product.

Is there a way to solve this?

Kind regards

your field.png

empty fields.png
Attachments (2)
Accepted Answer Pending Moderation
Hello Roland,

happy new year! Tried today an import of different products. However empty custom fields are imported again. V7.14 and „Skip empty custom fields“ iss et to Yes.

Kind regards,

Teresa

Von: RolandD Cyber Produksi <support@rolandd.com>
Gesendet: Dienstag, 24. September 2019 15:47
An: it@hodiso.de
Betreff: [#59778]: Do not import empty custom fields (VM) from a record. (Reply)


New Reply Added
rolandd replied to the discussion Do not import empty custom fields (VM) from a record.
Hello,
This is a notification to let you know that rolandd has replied to the discussion on the site. You may find the snippet of the reply below:

Hello Teresa,

The patch is available. Our initial idea didn't work out unfortunately so it took some more time than planned. After you apply the patch, you need to edit your import template. On the Options tab you will find a new setting called Skip empty custom fields. If you set this to Yes, the empty custom fields won't be added anymore.

Let us know how it goes.
Attachments:patch_20190924.zip Read this discussion

This email was sent to you, because you have subscribed to the discussion.
To unsubscribe, please click here. Manage subscriptions.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello Roland,

I'm still looking for a solution to the non - import of empty custom fields.

Unfortunately, empty customs fields are still being added to the products.

I ask for your help?

Kind regards,

Teresa
Attachments (3)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Teresa,
Please also include the import debug log to check. To get the debug log check How to collect debug information? document.
Kind regards,

Tharuna

=========================
If you use our extensions, 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
Hello Tharuna,

here the log.

Kind regards,

Teresa
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Teresa,
Thank you for posting the needed files. I was able to reproduce the issue and fixed it with the attached patch file. Please load the attached patch file and check the import.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, 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 Tharuna,

thank you very much! Now it works fine. However....

In the meantime we have changed the Joomla template to VP Smart. Here you have the option of displaying tabs based on custom fields in the product details. However, these custom fields must be empty, only the title is required - I'm going crazy.

Is it possible to ignore the "skip empty fields" setting for individual fields during import? Maybe with a rule?

Thanks in advance!

Kind regards,

Teresa
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Teresa,
thank you very much! Now it works fine. However....

Thank you for confirming that patch is working. This fix will be included in our upcoming RO CSVI release.

In the meantime we have changed the Joomla template to VP Smart. Here you have the option of displaying tabs based on custom fields in the product details. However, these custom fields must be empty, only the title is required - I'm going crazy.

The title of the custom field is the tab title and so you need only the title but not the value. Is that correct?

Is it possible to ignore the "skip empty fields" setting for individual fields during import? Maybe with a rule?

Skip empty custom fields does not work on individual fields and works on all included custom fields in the import. There is no direct rule to do this but you can create an override for import and add custom code to avoid the Skip empty custom field setting for some specific fields.
Kind regards,

Tharuna

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

thank you for your explanation.

The title of the custom field is the tab title and so you need only the title but not the value. Is that correct?

Yes, that's correct.

Skip empty custom fields does not work on individual fields and works on all included custom fields in the import. There is no direct rule to do this but you can create an override for import and add custom code to avoid the Skip empty custom field setting for some specific fields.

As you know, I am not well equipped with my programming skills. Could you please do this override for me? If there are any costs for this, please send me an invoice.

Currently 3 fields are affected by the import product:
COM_VIRTUEMART_TAB1_FIELD
COM_VIRTUEMART_TAB2_FIELD
COM_VIRTUEMART_TAB3_FIELD

Correspondingly in the import XML:
<Product_Tab1> </Product_Tab1>
<Product_Tab2> </Product_Tab2>
<Product_Tab3> </Product_Tab3>

I am sending the access data for the test page with this post.

Kind regards,
Teresa
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Teresa,
Please check the email from Roland with the details on this custom job.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Good morning Teresa,
However we are using the "your field" option and all files are created from ERP with these names. Changing the names in ERP would be a hard job! When doing import with the above mentioned configuration, CSVI doesn't recognize the "your field"- names as field.

That is correct when Use file for configuration is set to Yes, you are telling RO CSVI to read the column headers from import file and not to use template fields. So CSVI does not recognise Your fields field.

When doing import with "use file for configuration = NO" all assigned template fields to the template are added to the product - empty or not. So we have a lot of custom fields which are not in use with the product.

Say if there are 5 custom fields added to template fields and every product has value for any one of these custom field and other 4 are empty, you are saying you don't want those empty 4 custom fields added to a product. That is not going to be possible. RO CSVI will process all the columns for all the product rows. To Skip fields, you can use RO CSVI Skip template field which will skip the import of that custom field for all the products inspite of having a value or not.

Only possible solution i am seeing for this issue is that you can try creating an override for product import by copying file /plugins/csviaddon/virtuemart/com_virtuemart/model/import/product.php to override location. In the override product.php file, look for function processCustomFields there you can add a check if there is value then process the custom fields.
Kind regards,

Tharuna

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

thanks for the reply.

To Skip fields, you can use RO CSVI Skip template field which will skip the import of that custom field for all the products inspite of having a value or not.


You're right, that doesn't work for me.

The override sounds good, however my skills... ;-)

Please, can you help me with this? Even if it causes costs ...

This check should only affect self-created fields. Another exception would be the related products and related categories.

Kind regards,
Teresa
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello Teresa,
Just wanted to ask you, can you tell us the problems you have in importing these empty values?
Kind regards,

Tharuna

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

I do not know exactly what you mean.

Anyway, there are about 70 custom fields that could be assigned to a product.

In principle, all fields could be used for any product. In practice it looks like product number 1 gets the custom fields number 5, 8, 10, 19 etc. assigned. Product number 2 can have the same fields, but does not have to. So product 2 gets field 5, 8, 11, 23 etc.
Product 3 has partially the same fields as 1 and 2 and could have other fields as well.

A wine bottle has a certain quantity content, sugar, alcohol, vintage, color, shelf life, temperature, vineyard, grape variety etc.

A jar of jam also has a bulk content, sugar, color etc. but has no vintage or alcohol etc.

This data is maintained in the ERP and is exported in the KML file - some fields have values, others do not.

I tried the skip rule "skip empty fields". However, this means that the entire record of the product is not imported. It would be helpful if only the empty fields of the record are not imported.

Kind regards,

Teresa
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello Teresa,
Thank you for the explanation. The issue is very clear now. I was asking that what is the problem you have with empty custom fields for a product. Like you said product number 1 gets the custom fields number 5, 8, 10, 19, the issue now is that this product gets more than these custom fields and with empty values. I understand from screenshot that in VirtueMart Product page and on custom fields tab you have many number of custom fields with empty values on backend. What else is the issue with these empty custom fields?
Kind regards,

Tharuna

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

I don't need them there. Our customers can not cope with this. Very confusing for some.

Kind regards,

Teresa
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello Teresa,

I have been reading this thread as well. The Your field is actually used for mapping XML fields to existing CSVI fields. Yes, if the value is empty in your import file, it would still be imported. If we don't, people will ask why the empty value is not imported :p

Your issue of having nearly 70 empty custom fields in a product edit page I can understand as well. I need to sleep on this and see what I can come up with on how to tackle this.
Kind regards,

RolandD

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

Thank you for your patience, I want to give you a status update. We have been working on a solution for this and are close to finishing this up. I expect over the next few days to complete this and get it ready for you to use.
Kind regards,

RolandD

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

The patch is available. Our initial idea didn't work out unfortunately so it took some more time than planned. After you apply the patch, you need to edit your import template. On the File tab you will find a new setting called Skip empty custom fields. If you set this to Yes, the empty custom fields won't be added anymore.

Let us know how it goes.
Attachments (1)
Kind regards,

RolandD

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


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