1. jcsl
  2. RO CSVI
  3. Monday, 19 November 2018
  4.  Subscribe via email
I have some data that are given in XML Format (See attached file ) sample-product-details.txt . Please note that the source XML file is huge ( about 40M Byte and contains many other data ).

From this XML I need to create the tab " Λεπτομέρειες Προιόντος " - This is the second tab in the page https://www.miele.gr/domestic/refrigerators-freezers-and-wine-units-2497.htm?mat=07514920&name=KF_1901_Vi.

The relevant tab is part of the Long Description of Virtuemart. What I have done already is created the Long descritption of the product ( the other tabs you see on the url I sent you ) by reading a CSV file. However the part of the second tab is not provided in csv but in xml. I need to create the html for that part per material number of each product and then concat that with the rest of the long description so it is imported as one field ( long description ) in CSVI.the concat part I can do ... but how do I create the html for second tab by retrieving the relevant data per material number from the XML file ?

Do you think you can help ?
Accepted Answer Pending Moderation
Hello,
Correct me if i am wrong, Are you looking at reading product long description from a XML file and add html to it and import it to a product? I am not clear with create the html in your question "but how do I create the html for second tab by retrieving the relevant data per material number from the XML file ?" Can you give an example with some long description content?
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
Yes that is right ... I create the Long description by conatanating different cells in libre office. However the info included in second tab as described before are not included in the csv but are part of a huge ( 40MB ) xml file ( I already sent you part of it that refers to the data I want to extract). Below you may find the html produced in long description by libre calc. It start in the tab {tab title="Product Details" alias="details" class="gray mieletabs" mode="click" scroll="true"}. Now it has some other content automatically retrieved from the csv file but that data is wrong and needs to be replaced with correct data from xml file give.
If I manage to retrieve from the xml the relevant data per product ( material number ) then in a similar way I can create the html for the second tab and concatenate to the existing long description.
Any ideas help would be much appreciated.


MieleLong-Description.html.zip
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
With VirtueMart Product import, you can update a product using any of the three fields product_sku or product_mpn or product_gtin. I am not sure how you have set your product material number in database. If its stored in one of these three fields then in your import template settings on Options tab, set Import based on field to product_sku or product_mpn or product_gtin as per your data stored in database. By default this field is set to product_sku and If you don't see this Import based on field, click on Advanced button on top.

Next thing is to read the data from your XML file. Since you need to update only long description for a product, you need two template fields. One is the field to identify your product which is the field you have set as Import based on and other would be product_desc. Add these two fields and then set up your XML as explained in Import XML 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
  • Page :
  • 1


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