1. chabi01
  2. RO CSVI
  3. Monday, 09 November 2020
  4.  Subscribe via email
Hi,
I use these 2 pages to try to add or update my custom fields :
https://rolandd.com/support/ro-csvi/duplicated-customfields
https://rolandd.com/documentation/ro-csvi/virtuemart/product-import-with-custom-fields

In my template and csv field, i have this :

product_sku custom_title custom_value custom_override custom_delete
P000023 onglets some value 1 1
P000023 Disponibilité some value 1 1
P000023 prixbase some value 1 1
P000097 onglets some value 1 1
P000097 Disponibilité some value 1 1
P000097 prixbase some value 1 1
P000117 onglets some value 1 1
P000117 Disponibilité some value 1 1
P000117 prixbase some value 1 1



I have added "custom_delete" as without it, it was not working better.
In this file : for the custom field "onglets" (editor field), i always have a duplication and not a replacement !

How to have a proper replacement when i import the file ? I would like to have : if the custom field does not exist, import the value, if the custom field have already a value, replace it with the new value...

Thanks :)
Xavier
Accepted Answer Pending Moderation
Hello Xavier,
I have added "custom_delete" as without it, it was not working better.

custom_delete is to remove the existing custom field value. We need to check why the existing custom value is not replaced without custom_delete field.

How to have a proper replacement when i import the file ? I would like to have : if the custom field does not exist, import the value, if the custom field have already a value, replace it with the new value...

RO CSVI uses custom_title field value to find the existing custom field. The value onglets, is the name of the custom field same in your VirtueMart Custom fields page? Can you please 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. 3 weeks ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hi again Tharuna,
Yes, "onglets" is the name of the custom fields.

Here are the debug and csv file for the test :)

Thanks again !!!!!
Xavier
Attachments (2)
  1. 3 weeks ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Xavier,
The value of custom field onglets has been updated and no new record is created. See the below query from import debug log.

Post a screenshot on where you see the duplicates.


UPDATE `k14d3_virtuemart_product_customfields` SET `virtuemart_product_id`='40',`virtuemart_custom_id`='10',`customfield_value`='{tab Composition}<p><ul><li>Fibre de bois, sulfate d\'aluminium, paraffine\n</li></ul></p>{tab Caractéristiques techniques}<p>Type H :<br/><ul><li>Marquage CE selon NF EN 13171 : WF EN 13171 – T5 – DS(70/90)3 – CS (10 \\ Y)150 – TR20(30) – WS1,0 – MU5</li><li>Format brut (profil) : 1325 x 600 (rainures languettes) ou 2625 x 1175 (rainures languettes) ou 2800 x 1250 (chants droits)</li><li>Format utile : 1300 x 575 ou 2600 x 1150 ou 2800 x 1250</li><li>Réaction au feu selon EN 13501-1 : E</li><li>Conductivité thermique λD selon NF EN 12667 : 0,048 W/(m*K)</li><li>Keymark λ selon NF EN 12667 : 0,048 W/(m*K)</li><li>Résistance thermique RD selon NF EN 12667 : 0,80 (m²*K)/W pour une épaisseur de 40 mm</li><li>Masse volumique ρ : env. 265 (m²*K)/W </li><li>Facteur de résistance à la diff. de vapeur d’eau μ : 5</li><li>Valeur sd : 0,20 m pour une épaisseur de 40 mm / 0,50 m pour une épaisseur de 100 mm</li><li>Capacité thermique massique c : 2100 J/(kg*K)</li><li>Résistance à la compression : 150 kPa</li><li>Résistance à la traction σt : 20 kPa</li><li>Code de recyclage (AAV) : 030105 / 170201</li></ul>Type M :<br/><ul><li>Marquage CE selon NF EN 13171 : WF EN 13171 – T5 – DS(70/90)3 – CS (10 \\ Y)100 – TR15(30) – WS1,0 – MU5</li><li>Format brut (profil) : 1325 x 600 (rainures languettes) ou 2625 x 1175 (rainures languettes) ou 2800 x 1250 (chants droits)</li><li>Format utile : 1300 x 575 ou 2600 x 1150 ou 2800 x 1250</li><li>Réaction au feu selon EN 13501-1 : E</li><li>Conductivité thermique λD selon NF EN 12667 : 0,046 W/(m*K)</li><li>Keymark λ selon NF EN 12667 : 0,046 W/(m*K)</li><li>Résistance thermique RD selon NF EN 12667 : 2,15 (m²*K)/W pour une épaisseur de 100 mm</li><li>Masse volumique ρ : env. 230 (m²*K)/W </li><li>Facteur de résistance à la diff. de vapeur d’eau μ : 5</li><li>Valeur sd : 0,20 m pour une épaisseur de 40 mm / 0,50 m pour une épaisseur de 100 mm</li><li>Capacité thermique massique c : 2100 J/(kg*K)</li><li>Résistance à la compression : 100 kPa</li><li>Résistance à la traction σt : 15 kPa</li><li>Code de recyclage (AAV) : 030105 / 170201\n</li></ul></p>{tab Documentation}{/tabs}',`disabler`='0',`override`='0',`noninheritable`='0',`customfield_params`='',`published`='1',`created_on`='0000-00-00 00:00:00',`created_by`='0',`modified_on`='2020-11-09 09:22:02',`modified_by`='675',`locked_on`='0000-00-00 00:00:00',`locked_by`='0',`ordering`='0' WHERE `virtuemart_customfield_id` = '356'
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
uh.... yes it is...
Check my screenshot, before import and after import...
Attachments (2)
  1. 3 weeks ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Do you see any mistake in my csv file ?
To try to help, i have export my template for you..
Attachments (1)
  1. 3 weeks ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello Xavier,
I found the cause for your duplicate issue. When RO CSVI selects a row for custom field in database, it also checks for custom_value field. Since your custom_value has changed in your import file from what is in database, RO CSVI creates a new record. You need to do few changes to your import file.

1. Each product in your import file has multiple rows, you can make them all to go in one row. I have given a sample of import file which shows on how to combine multiple rows to one. Kindly note multiple custom fields are separated by ~.


product_sku;custom_title;custom_value;custom_override;custom_delete
P000023;onglets~Disponibilité~prixbase;"{tab Composition}<p><ul><li>Fibre de bois, sulfate d'aluminium, paraffine </li></ul></p>{tab Caractéristiques techniques}<p>Type H :<br/><ul><li>Marquage CE selon NF EN 13171 : WF EN 13171 – T5 – DS(70/90)3 – CS (10 \ Y)150 – TR20(30) – WS1,0 – MU5</li><li>Format brut (profil) : 1325 x 600 (rainures languettes) ou 2625 x 1175 (rainures languettes) ou 2800 x 1250 (chants droits)</li><li>Format utile : 1300 x 575 ou 2600 x 1150 ou 2800 x 1250</li><li>Réaction au feu selon EN 13501-1 : E</li><li>Conductivité thermique λD selon NF EN 12667 : 0,048 W/(m*K)</li><li>Keymark λ selon NF EN 12667 : 0,048 W/(m*K)</li><li>Résistance thermique RD selon NF EN 12667 : 0,80 (m²*K)/W pour une épaisseur de 40 mm</li><li>Masse volumique ρ : env. 265 (m²*K)/W </li><li>Facteur de résistance à la diff. de vapeur d’eau μ : 5</li><li>Valeur sd : 0,20 m pour une épaisseur de 40 mm / 0,50 m pour une épaisseur de 100 mm</li><li>Capacité thermique massique c : 2100 J/(kg*K)</li><li>Résistance à la compression : 150 kPa</li><li>Résistance à la traction σt : 20 kPa</li><li>Code de recyclage (AAV) : 030105 / 170201</li></ul>Type M :<br/><ul><li>Marquage CE selon NF EN 13171 : WF EN 13171 – T5 – DS(70/90)3 – CS (10 \ Y)100 – TR15(30) – WS1,0 – MU5</li><li>Format brut (profil) : 1325 x 600 (rainures languettes) ou 2625 x 1175 (rainures languettes) ou 2800 x 1250 (chants droits)</li><li>Format utile : 1300 x 575 ou 2600 x 1150 ou 2800 x 1250</li><li>Réaction au feu selon EN 13501-1 : E</li><li>Conductivité thermique λD selon NF EN 12667 : 0,046 W/(m*K)</li><li>Keymark λ selon NF EN 12667 : 0,046 W/(m*K)</li><li>Résistance thermique RD selon NF EN 12667 : 2,15 (m²*K)/W pour une épaisseur de 100 mm</li><li>Masse volumique ρ : env. 230 (m²*K)/W </li><li>Facteur de résistance à la diff. de vapeur d’eau μ : 5</li><li>Valeur sd : 0,20 m pour une épaisseur de 40 mm / 0,50 m pour une épaisseur de 100 mm</li><li>Capacité thermique massique c : 2100 J/(kg*K)</li><li>Résistance à la compression : 100 kPa</li><li>Résistance à la traction σt : 15 kPa</li><li>Code de recyclage (AAV) : 030105 / 170201 </li></ul></p>{tab Documentation}{/tabs}~<img src='images/template/boutonspicto/en_stock.png' alt='Stock permanent' title='Stock permanent' />~Tarif sur devis";1;1

2. I noticed you are using ~ as a separator in import file, may i know why you need to use it instead of standard separator comma(,)? To use multiple custom fields in one row you need to change your separator to , and text enclosure to " as custom fields are also separated by ~.
3. Once you set up your import file as said in point 1 and 2, in your import template on Options tab set Delete custom field relations to Yes, save the template and run the import. This setting will delete the previous value for custom field and insert the new value from import file. This will not work when you have multiple rows for same product in import file and that is because this setting will be executed for each row so when the first row for product with custom field is imported and when the second row runs this setting deletes all the custom fields for product which also includes the value from first row. This setting is a common for all and is not specific for one custom field.

Let me know if i have explained it clear.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hi Tharuna,
Ok, i think i have understood your explanation. I make the test this afternoon and come back to give you the results :)

For the ~ separator, I often use it because in french, we use a lot of ", ', , etc.. Then, the tilde is often used in my csv files :)

I test this afternoon and come back ;)

Xavier
  1. 3 weeks ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hi again Tharuna,

Something still wrong...
Now, with your test file, the template modified as you said, i dont have the "onglet" custom file duplicated, but the 2 other custom files are not imported at all...

I send you the template and csv file, maybe you can see where is the issue...

Xavier
Attachments (2)
  1. 3 weeks ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
...and the log file also !
Attachments (1)
  1. 3 weeks ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
...and I notice also, my custom field "variant" to show children as dropdown is also lost...
  1. 3 weeks ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello Xavier,
Something still wrong...
Now, with your test file, the template modified as you said, i dont have the "onglet" custom file duplicated, but the 2 other custom files are not imported at all...

I send you the template and csv file, maybe you can see where is the issue...

Now that we have a setting in template to delete the previous custom field values, you don't need custom_delete field in import. Please try import with the below modified content.


product_sku;custom_title;custom_value;custom_override
P000023;onglets~Disponibilité~prixbase;"{tab Composition}11<p><ul><li>Fibre de bois, sulfate d'aluminium, paraffine </li></ul></p>{tab Caractéristiques techniques}<p>Type H :<br/><ul><li>Marquage CE selon NF EN 13171 : WF EN 13171 – T5 – DS(70/90)3 – CS (10 \ Y)150 – TR20(30) – WS1,0 – MU5</li><li>Format brut (profil) : 1325 x 600 (rainures languettes) ou 2625 x 1175 (rainures languettes) ou 2800 x 1250 (chants droits)</li><li>Format utile : 1300 x 575 ou 2600 x 1150 ou 2800 x 1250</li><li>Réaction au feu selon EN 13501-1 : E</li><li>Conductivité thermique λD selon NF EN 12667 : 0,048 W/(m*K)</li><li>Keymark λ selon NF EN 12667 : 0,048 W/(m*K)</li><li>Résistance thermique RD selon NF EN 12667 : 0,80 (m²*K)/W pour une épaisseur de 40 mm</li><li>Masse volumique ρ : env. 265 (m²*K)/W </li><li>Facteur de résistance à la diff. de vapeur d’eau μ : 5</li><li>Valeur sd : 0,20 m pour une épaisseur de 40 mm / 0,50 m pour une épaisseur de 100 mm</li><li>Capacité thermique massique c : 2100 J/(kg*K)</li><li>Résistance à la compression : 150 kPa</li><li>Résistance à la traction σt : 20 kPa</li><li>Code de recyclage (AAV) : 030105 / 170201</li></ul>Type M :<br/><ul><li>Marquage CE selon NF EN 13171 : WF EN 13171 – T5 – DS(70/90)3 – CS (10 \ Y)100 – TR15(30) – WS1,0 – MU5</li><li>Format brut (profil) : 1325 x 600 (rainures languettes) ou 2625 x 1175 (rainures languettes) ou 2800 x 1250 (chants droits)</li><li>Format utile : 1300 x 575 ou 2600 x 1150 ou 2800 x 1250</li><li>Réaction au feu selon EN 13501-1 : E</li><li>Conductivité thermique λD selon NF EN 12667 : 0,046 W/(m*K)</li><li>Keymark λ selon NF EN 12667 : 0,046 W/(m*K)</li><li>Résistance thermique RD selon NF EN 12667 : 2,15 (m²*K)/W pour une épaisseur de 100 mm</li><li>Masse volumique ρ : env. 230 (m²*K)/W </li><li>Facteur de résistance à la diff. de vapeur d’eau μ : 5</li><li>Valeur sd : 0,20 m pour une épaisseur de 40 mm / 0,50 m pour une épaisseur de 100 mm</li><li>Capacité thermique massique c : 2100 J/(kg*K)</li><li>Résistance à la compression : 100 kPa</li><li>Résistance à la traction σt : 15 kPa</li><li>Code de recyclage (AAV) : 030105 / 170201 </li></ul></p>{tab Documentation}{/tabs}~<img src='images/template/boutonspicto/en_stock.png' alt='Stock permanent' title='Stock permanent' />~Tarif sur devis";Y~Y~Y


...and I notice also, my custom field "variant" to show children as dropdown is also lost...

Did the product have custom fields added other than the ones in import file?
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hi Tharuna,
Nice :)
It works like this :)

Just one thing remaining, how to integrate in my custom file the generic variant custom field (used to show children products in the product detail page) ?

Thanks a lot :)
Xavier
  1. 3 weeks ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hello Xavier,
Nice :)
It works like this :)

Glad to know it works without issues :)

Just one thing remaining, how to integrate in my custom file the generic variant custom field (used to show children products in the product detail page) ?

You can add generic variant custom field to custom_title, custom_value fields separated by ~ with other custom fields. Check Import Generic child variant for VirtueMart he document for example import.

Let me know if you need any more help.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 3 weeks ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hi Tharuna,
No, no, i'm speaking of the "variante" (in french) field existing in Virtuemart to show the children product in a parent product : there is no value for this, you only activate the field and that's all.
The thing is : i dont know how to call this field in the import file (no value for this field when i select it...)

Thanks Tharuna :)
Xavier
  1. 2 weeks ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
I found the name in english, it is the "Generic child variant" already existing in Virtuemart.
I dont know how to include this field in the import file as i can put the name (variante in french) but i dont know what "value" i have to add for this field (as i dont see any values...
I put a screenshot in english to let you see the field i'm talking to.

Thanks a lot for all the time i take from you Tharuna...
Xavier
Attachments (1)
  1. 2 weeks ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello Xavier,

Have a look at the document Tharuna linked about importing the Generic child variant field. In your case the name seems to be variante which in the example is shoe size.

As for the values, these are the checkboxes and the dropdown. The dropdown has a default value of product_name as shown in the tutorial. The checkboxes are explained at the end of the document.

Let me know if that helps.
Kind regards,

RolandD

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


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