1. konstantinos29
  2. RO CSVI
  3. Tuesday, 17 December 2019
  4.  Subscribe via email
Hello,

We are trying to export products with their custom fields (Virtuemart).
The result file seems to not be congruent, with the live site product.

Example (see attached images).

We are specifically interested in the custom field called "Επιλέξτε Τύπο".
The number of values contained in "custom_title", is different than the number of values in "custom_value". (I don't even know what most of these values in custom_value are).
It is therefore impossible to parse the fields.



[RO CSVi 7.14, Joomla 3.9.8, VM 3.2.15]
Attachments (3)
Accepted Answer Pending Moderation
Hello,
You have one more custom field other than "Επιλέξτε Τύπο" of type plugin. For which plugin does that custom field belong to? It is possible that there could be entries in database for this custom field and you are seeing them on export.
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. # 1
Accepted Answer Pending Moderation
Hello,

The other plugin is Custom Fields for All (breakdesigns).
I cannot explain the additional data in custom_value.

I am attaching a screenshot of another product, with no custom fields assigned to it.
There's no custom_titles, but there are plenty of values in custom_value and custom_price.

Could it be a database cache, corruption, or useless leftover data? How could we troubleshoot further?

Thanks
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
Can you also post the export debug log? I am thinking this could be because of useless leftover data in your database, what we can do is get the query of customfieldsforall from debug log and run it in your phpMyAdmin. That would tell us where these values are coming from.
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
Sure, here's the debug log
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
Let us take one product from your debug log, product with virtuemart_product_id 800. I am not sure if this product gets leftover values on export but if you know virtuemart_product_id of the product which gets unwanted values you can replace 800 with that id in the below query and run it. To run the query, go to phpMyAdmin, select your database and on the right side click on SQL tab, Paste the below query and click Go. Do you see the values you see in custom_value field in your export file with the query result?

SELECT `customfield_value`,`cf`.`virtuemart_customfield_id`,`cf`.`virtuemart_custom_id`,`cf`.`customfield_params`,`c`.`field_type`,`c`.`custom_element` FROM `jos_virtuemart_product_customfields` AS `cf` LEFT JOIN `jos_virtuemart_customs` AS `c` ON `c`.`virtuemart_custom_id` = `cf`.`virtuemart_custom_id` WHERE `cf`.`virtuemart_product_id` = 800 ORDER BY `cf`.`ordering`,`cf`.`virtuemart_custom_id`
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
I am adding a screenshot of product id 966 (same product as screenshots provided in first post).

The custom fields in the database seem to be consistent with the CSV output. But most of these entries are not used, and I don't know where they came from.
Do you know of any (safe) way to remove dead entries from the database?

Also, it would help me parse the useful data, if in the custom_title output, the amount of entries matched the entries in custom_value. (see first post CSV screenshot)
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,
The custom fields in the database seem to be consistent with the CSV output. But most of these entries are not used, and I don't know where they came from.

Yes those are the leftovers in your database. Could be possible that the custom fields are deleted but the values assigned to the products for the deleted custom field remains in the database.

Do you know of any (safe) way to remove dead entries from the database?

There is no direct way of removing these dead entries. What if you try to save the product id 966 from VirtueMart, do the values get cleaned on save? Can you give it a try?

Also, it would help me parse the useful data, if in the custom_title output, the amount of entries matched the entries in custom_value. (see first post CSV screenshot)

custom_title and custom_value are two different columns in VirtueMart database table. There are two different queries which run for fetching these values. Normally these values would always match on export unless a situation like this where there is a database inconsistency with 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. # 7
Accepted Answer Pending Moderation
I saved the product again in VM, nothing changed in terms of the database and the associated custom fields.
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello,
Then i think you may need to find a way to delete those useless entries from database. If you want to do that with RO CSVI, you can do a fresh import of products with custom fields by setting Delete custom fields relation to Yes in your import template settings and on Options tab. This way the custom fields in the database are deleted for a product and new custom fields are inserted.
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
  • Page :
  • 1


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