1. roderic
  2. RO CSVI
  3. Thursday, 25 February 2021
  4.  Subscribe via email
Hello,

I am trying to import XML files from VendIT into Virtuemart. I'm struggling with it as these XML files Vendit offers, don't seem to suit CSVI. Could you please tell me if it is even possible with the attached XML files? The hierarchy makes it that it only imports the first item.. For example, in the groups.xml one, it will only import the "Bikes" category and not the ones in the subgroups. Is there a workaround?

Groups = categories.

Joomla 3.9.24
CSVI: 7.20.0
Attachments (2)
Accepted Answer Pending Moderation
Hello,
Can you tell us how you have the template fields set now in your import template? You can post your import template XML to check. To get your template XML file, in RO CSVI maintenance menu select RO CSVI on first option, backup templates on second option, select your template and download the XML file. Post the XML file.

Also tell us how are you expecting subgroups categories to be read? Are they subcategories of Bikes category or they are individual categories? Can you give an example?
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,

XML attached.

"Also tell us how are you expecting subgroups categories to be read? Are they subcategories of Bikes category or they are individual categories?" They can be subcategories of several parent categories.

"Can you give an example? "
The subgroup/subcategory in the previously attached groups.xml, Onderdelen is a subcategory of Bikes
As can be seen by:

<Parent_Guid>898714B0-BB0C-4541-A325-D967B9EC43B1</Parent_Guid>

which is the same Guid as

<GroupGuid>898714B0-BB0C-4541-A325-D967B9EC43B1</GroupGuid>
From Bikes


The problem seems to be that CSVI just stops after the parent category because it get's confused by the

<SubGroups>
tag

Cheers
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
The subgroup/subcategory in the previously attached groups.xml, Onderdelen is a subcategory of Bikes

Ok so the category_path to be built will be Bikes/Onderdelen/Aandrijving, is that correct?

The problem seems to be that CSVI just stops after the parent category because it get's confused by the

The problem is not with SubGroups tag but Group tab after SubGroups. RO CSVI reads the XML based on the record name set in template settings. In the Record name you have set it to Group and the node name after SubGroups is also Group. That is the problem here.
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
Hello,
Ok so the category_path to be built will be Bikes/Onderdelen/Aandrijving, is that correct?


Correctomundo

The problem is not with SubGroups tag but Group tab after SubGroups. RO CSVI reads the XML based on the record name set in template settings. In the Record name you have set it to Group and the node name after SubGroups is also Group. That is the problem here.


What would be a solution to this, without messing with the generated XML file from VendIT?
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
What would be a solution to this, without messing with the generated XML file from VendIT?

I am looking into this issue, will get back with a solution.
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,
I fixed our XML helper code to support multiple levels of same node name with the attached patch file. You need to

1. Load the attached patch file.
2. Add combine template fields and set the XML node path. See attached screenshot.
3. Create combine rule to use the combine fields XML path in rule. Set the rule on category_path field. See attached screenshot.
4. Run the import.

Let me know on how the import goes.
Attachments (3)
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
Thanks for your patch file. I tried playing around with it for a while. This should then also work with Products right?

Could you please give me one or two more examples with the newly attached file for:

price_with_tax: Products/Product/ProductVariations/ProductVariation/SalesPriceInc
and
product_gtin: Products/Product/ProductVariations/ProductVariation/Barcodes/Barcode BarcodeOrder="1"

Thanks in advance
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,
This should then also work with Products right?

Yes this would work on Products too.

Could you please give me one or two more examples with the newly attached file for:

In your import template on File tab set Record name field as Product, save the template. You can then use

price_with_tax >> ProductVariations/ProductVariation/SalesPriceInc
product_gtin >> ProductVariations/ProductVariation/Barcodes/Barcode

You can also use RO CSVI Analyser to get the path of the nodes so you use it for your import template fields. Let me know if that helps.
Kind regards,

Tharuna

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

I've been working on this quite a bit, but haven't found the time yet to reply. So here we go:

First of all, the RO CSVI Analyser didn't work because of the UTF-16 encoding but today (I'm at my client) I've managed to get exports with UTF-8 encoding so that helps with getting more insight.

I have a problem with the categories/groups. When I import the Groups.xml, it only takes the first (sub)Group/Category and then goes to the next.

So for example:

- 0 Bikes
-- 0 Fietsen
--- 0 Racefietsen
--- 1 Gravelbikes
--- 2 Mountainbikes
--- 3 Triathlonfietsen
-- 1 Fietskleding
-- 2 Onderdelen
-- 3 Accesoires

It will see all the (sub)Groups) wich are the first subgroups (those in bold), but not the 2nd, 3rd etc.

Does this require another patch?
Attachments (2)
  1. 2 weeks ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello,
First of all, the RO CSVI Analyser didn't work because of the UTF-16 encoding but today (I'm at my client) I've managed to get exports with UTF-8 encoding so that helps with getting more insight.

RO CSVI Analyser would have shown unreadable characters for files other than UTF-8 encoded. Is that what you are saying not working? Can you post a screenshot on what you see?

I have a problem with the categories/groups. When I import the Groups.xml, it only takes the first (sub)Group/Category and then goes to the next.

Please post the template XML to check. To get your template XML file, in RO CSVI maintenance menu select RO CSVI on first option, backup templates on second option, select your template and download the XML file. Post the XML file. With this template and your file, i can run the import and check what is going on with categories.

- 0 Bikes
-- 0 Fietsen
--- 0 Racefietsen
--- 1 Gravelbikes
--- 2 Mountainbikes
--- 3 Triathlonfietsen
-- 1 Fietskleding
-- 2 Onderdelen
-- 3 Accesoires

It will see all the (sub)Groups) wich are the first subgroups (those in bold), but not the 2nd, 3rd etc.

Can you give an example on how you expect category to be built with these values? Also tell me on how it is built right now with your import template.

Does this require another patch?

Not sure, let me first check the import with your import template.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello,
First of all, the RO CSVI Analyser didn't work because of the UTF-16 encoding but today (I'm at my client) I've managed to get exports with UTF-8 encoding so that helps with getting more insight.

RO CSVI Analyser would have shown unreadable characters for files other than UTF-8 encoded. Is that what you are saying not working? Can you post a screenshot on what you see?


It didn't do anything, I would select the file, uncheck "has column headers" and fill in a record name, then hit analyse but then it would just empty the fields and not give any output. But now with the UTF8 files it works as expected.

I have a problem with the categories/groups. When I import the Groups.xml, it only takes the first (sub)Group/Category and then goes to the next.

Please post the template XML to check. To get your template XML file, in RO CSVI maintenance menu select RO CSVI on first option, backup templates on second option, select your template and download the XML file. Post the XML file. With this template and your file, i can run the import and check what is going on with categories.

XML attached

- 0 Bikes
-- 0 Fietsen
--- 0 Racefietsen
--- 1 Gravelbikes
--- 2 Mountainbikes
--- 3 Triathlonfietsen
-- 1 Fietskleding
-- 2 Onderdelen
-- 3 Accesoires

It will see all the (sub)Groups) wich are the first subgroups (those in bold), but not the 2nd, 3rd etc.

Can you give an example on how you expect category to be built with these values? Also tell me on how it is built right now with your import template.


So I expect it to import all the categories and subcategories. So the proper hierachy:
Bikes / Fietsen / Racefietsen (works right now)
and
Bikes / Fietsen / Gravelbikes (doesn't work right now as it is the not the first subGroup of a Subgroup)

But also

Bikes / Fietskleding / Fietsjacks

and

Running / Hardloopschoenen / Allround hardloopschoenen


Basicallly all the Subgroups with <ItemOrder>0</ItemOrder> are being imported and <ItemOrder>1</ItemOrder> or more are not.
Attachments (1)
  1. 2 weeks ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello,
Bikes / Fietsen / Gravelbikes (doesn't work right now as it is the not the first subGroup of a Subgroup)

I am looking into this issue and will get back with an update.

Bikes / Fietsen / Racefietsen (works right now)
and
Bikes / Fietsen / Gravelbikes (doesn't work right now as it is the not the first subGroup of a Subgroup)

But also

Bikes / Fietskleding / Fietsjacks

What i don't understand here is that, you are trying to construct few category paths here. With RO CSVI multiple categories are combined with | like category1|category2|category3. Are these categories going to be combined with |? May i know the plan with these category paths?
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
I basically want all the categories / category paths that are in the Groups.xml file imported into Virtuemart. So every parent and child category.

See attachment for an example. Running is imported like expected except that it doesn't import the 2nd subgroup/childcategories in every category like I've explained before. So in my example the Category Running, Hardloopschoenen and Allround Hardloopschoenen are imported with the current import settings. The other 2 on my screenshot, wedstrijdschoenen and trailschoenen I had to add manually because they were ignored by the import.

Cheers
Attachments (2)
  1. 2 weeks ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello,
See attachment for an example. Running is imported like expected except that it doesn't import the 2nd subgroup/childcategories in every category like I've explained before. So in my example the Category Running, Hardloopschoenen and Allround Hardloopschoenen are imported with the current import settings. The other 2 on my screenshot, wedstrijdschoenen and trailschoenen I had to add manually because they were ignored by the import.

The issue i see here is that the node holding the value Allround Hardloopschoenen, wedstrijdschoenen and trailschoenen all have the same XML path SubGroups/Group/SubGroups/Group/GroupName. In your template i don't see any specific template fields for SubGroups/Group/SubGroups/Group/GroupName node for wedstrijdschoenen and trailschoenen values. You did not mention on how you tried to import wedstrijdschoenen and trailschoenen values. The node added in combine rule for category_path will read the first value Allround Hardloopschoenen and so that works. Adding combine and skip template fields to read the values wedstrijdschoenen and trailschoenen also reads the first value Allround Hardloopschoenen. We are looking into a possible solution here. Will get back with an update.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
Thanks so far, anything I can do to speed this up?
  1. one week ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,

So I have been looking into this and have some thoughts to share. First of all, I have improved the XML parser to be able to handle paths as well as single nodes. So instead of only being able to use Group you can now use Groups/Group/SubGroups/Group/SubGroups/Group as well to target a more specific set out of the whole.

Bikes / Fietsen / Racefietsen (works right now)
and
Bikes / Fietsen / Gravelbikes (doesn't work right now as it is the not the first subGroup of a Subgroup)
This is something I can't really give a straight solution for this because the XML is too generic, everything is called Subgroups and Groups. During import when you are at the Gravelbikes, it will have no knowledge of the Bikes/Fietsen because it is only looking at that field and not what is above it. Not all is lost :)

WIth the path I have given above if you look at the analyser you will see this output:
output_nested_subgroups.png
As you can see you do get the individual groups as separate rows as they are separate nodes. If you go higher up in the tree and you would only use Groups/Group/SubGroups/Group/SubGroups then you get all the bicycles in a single row.

All of this does require some of the coding changes I have done, they are not finished yet as it works in the analyser at the moment, it does not yet work on the import. The plan is to finish it up in the next couple of days. I do want it ready for production so it can go in with the next release.

There is nothing at the moment that can be done to speed up this process.
Attachments (1)
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 16
Accepted Answer Pending Moderation
Hi Roland,

Thanks for your reply. Right now it requires a category path to be able to have a proper hierachy. But when making use of the Parent group ID (<Parent_Guid>;), this could maybe be make it easier?


Met vriendelijke groet,
Roderic
  1. one week ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hello Roderic,

Working diligently on the XML parsing and happy to report that I am almost there. One thing I am looking at now is the last group for Triathlon. The way it works now is that you can use what is called an xpath. This is the complete XML path, so for your file that would be GroupExport/Groups/Group/SubGroups/Group/SubGroups/Group. However your last node does not match this path. This only reaches GroupExport/Groups/Group/SubGroups/Group and does not show up.

I am of the opinion we should show also the paths that match the beginning of the xpath. That is the final hurdle to finish and then it should be ready for use by you.

Attached is a screenshot of what we see now, as you can see the XML has been flattened to a CSV style with the parent info for each level.
Attachments (1)
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 18
Accepted Answer Pending Moderation
Hoi Ronald,

That's looking good. But in your screenshot I'm also missing:
Bikes/Fietsen/Mountainbikes,
Bikes/Fietsen/Baanfiets,
Bikes/Fietsen/Triathlonfietsen

Expected or overlooked?

Cheers,

Roderic
  1. one week ago
  2. RO CSVI
  3. # 19
Accepted Answer Pending Moderation
Hello Roderic,

That is expected because I trimmed down the test file to make it easier to follow :)
Kind regards,

RolandD

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


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