1. greenlizzard
  2. RO CSVI
  3. Thursday, 01 December 2016
  4.  Subscribe via email
Hi

I am trying to set up a xml import from a file on the server, I have followed everything acording to the instructions but it is not working

I have a xml file called courses.xml'

the format is as follows
<courses>
<course courseid="2058">
<name>PRINCE2 Foundation</name>
<type>1</type>
<summary/>
<description/>
<status>confirmed</status>
<date start_date="05/12/16" duration="3.0"/>
<price cost="795.00" special="625.00" lp_special="0.00" currency="£"/>
<seats capacity="" sold="" remaining="0"/>
<venue id="51" name="Southampton (Eastleigh)" long_name="Eastleigh - The Learning Centre " venue_url="http://www.bestpracticetraining.com/southampton-eastleigh.html"/>
</course>

there are 707 records

I have run the analyser and it look fine;

courseid
name
type
status
date/start_date
date/duration
price/cost
price/special
price/lp_special
price/currency
seats/capacity
seats/sold
seats/remaining
venue/id
venue/name
venue/long_name
venue/venue_url
Data
Top
If you see any unreadable characters in this table, your file is not UTF-8 encoded. Make sure your file is UTF-8 encoded so special characters like ë are imported correctly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
courseid name type status date/start_date date/duration price/cost price/special price/lp_special price/currency seats/capacity seats/sold seats/remaining venue/id venue/name venue/long_name venue/venue_url
2058 PRINCE2 Foundation 1 confirmed 05/12/16 3.0 795.00 0.00 0.00 £ 0 51 Southampton (Eastleigh) Eastleigh - The Learning Centre http://www.bestpracticetraining.com/southampton-eastleigh.html
2059 PRINCE2 Practitioner 1 confirmed 08/12/16 2.0 595.00 0.00 0.00 £ 0 51 Southampton (Eastleigh) Eastleigh - The Learning Centre http://www.bestpracticetraining.com/southampton-eastleigh.html
2060 PRINCE2 Foundation and Practitioner 1 confirmed 05/12/16 5.0 1195.00 0.00 0.00 £ 0 51 Southampton (Eastleigh) Eastleigh - The Learning Centre http://www.bestpracticetraining.com/southampton-eastleigh.html

Ihave set up a template to import into Hikashop with the record name course

I have set up the template fields

Whern I do a import I only get the product codes for 707 records but nothing else
This preview shows how CSVI reads your file, not how the file is imported. The fields you see here are not validated yet, that will happen once you start the import. In case your file contains unsupported fields, CSVI will skip them during import as it will not know how to handle them.
Import file contains 707 lines
product_code product_name product_type price_with_tax product_url
2058
2059
2060
2061
2062


But If i change the record in the template to say courses, I get the fields displayed properly but only for 1 record

This preview shows how CSVI reads your file, not how the file is imported. The fields you see here are not validated yet, that will happen once you start the import. In case your file contains unsupported fields, CSVI will skip them during import as it will not know how to handle them.
Import file contains 1 lines
product_code product_name product_type price_with_tax product_url
2058 PRINCE2 Foundation 1 795.00 http://www.bestpracticetraining.com/southampton-eastleigh.html


I am stumped as to what I am doing wrong, can someone please help me out here.

Regards
Gerald
Accepted Answer Pending Moderation
Hello Gerald,
If you are seeing only product_code then there must be something wrong in the way template fields are set up. Can you send your template XML file to check? To get the template XML file goto CSVI maintenance menu, select CSVI Pro on first option, backup template on second option. Click continue and download the XML file. Please post the XML file along with sample XML file you used for import. Also post the debug log of the import you did. To know how to get the debug log check Where to get the debug information? section on top of this page.
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
Hi Tharuna

Here is the information as requested.

the debug log says everything is updated sucessfully but I only get the product code

Regards
Gerald
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
The problem is in the way the path for XML set in Your fields in template fields. Since you have already set the node name to course in template settings you don't need this in the XML path in your template fields. For example for product_name field you just need to have name instead of course/name. The product_code worked as it has an second element in the same node. Remove course from the XML path and try doing the import.
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
Hi Tharuna

Thank you that works, I was pulling my hair out, I was following the details in the xml import and it said to set it up how I did first. but now it works perfectly

Thank You
Regards
Gerald
  1. more than a month ago
  2. RO CSVI
  3. # 4
  • Page :
  • 1


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