1. jkirkpat
  2. RO CSVI
  3. Thursday, 15 August 2013
  4.  Subscribe via email
Hi, I am running Joomla v. 3.1.5 and I just acquired v. 5.11 of CSVI. I am running K2 v. 2.6.7.

Forgive me if this is a silly question, but I am new to this wonderful component :)

Anyway…

I have a pretty basic CSV file to import and so far it looks pretty straightforward. However, I have a couple of Extra Fields to import, namely Part Number and Price. Do I include the path, same principle as Category (e.g. extra_field/part_number and extra_field/price?

…or am I on the wrong track?

Please advice me of the correct method.

Many thanks in advance.
Accepted Answer Pending Moderation
Ha, ha!

I just imported the file you attached and it works like a dream.

But no worries, I wouldn't have figured it out on my own. I kept my .csv file simple for testing purposes, and that obviously worked to my disadvantage.

And so we can mark this issue as *solved* and I would like to thank you very much for your assistance!
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello,

Ok, so I have tackled the problem. I must have had tunnel vision not to see this earlier :) The problem is that your file is too simple. With that I mean, there is not enough information for CSVI to find the correct K2 Item. A unique item is determined based on the alias and category_path. Both these fields are missing from your import file.

Attached is the file I used that imported the custom field values.
Attachments (1)
Kind regards,

RolandD

=========================
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. # 2
Accepted Answer Pending Moderation
Hello,

Forgive my late reply.

I just PMd you with the info you requested…

Cheers!
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,

I have sent you a private message.
Kind regards,

RolandD

=========================
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. # 4
Accepted Answer Pending Moderation
Hi,

I just checked the file you speak of and it contains the line:

//$this->extra_fields = '[]';

Thanks.
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,

(I assume the file you want me to open is extrafieldimport.php),
Oops, I forgot to mention the file. The file is the itemimport.php file as we are doing an item import. Can you check that one?
Kind regards,

RolandD

=========================
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. # 6
Accepted Answer Pending Moderation
Hi,

When I load the patch, I get a "success" message (see attached screenshot).

However, I look in the file path you point me to (I assume the file you want me to open is extrafieldimport.php), I run a search, and I don't see the string you speak of. I am attaching the extrafieldimport.php file I looked in so you will know right away whether or not it is the one associated with your most recent patch…

Thanks and sorry for all the hassle.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,

The *only* other thing I can think of is, although my extra fields are text fields, they contain numerical values (i.e., Part Number and Price). Would that be what is confusing things?
That is not a problem, I imported your file also and this was just fine.

I am starting to think that the patch file is not in place. Do you see this line

//$this->extra_fields = '[]';
in the file administrator\components\com_csvi\models\com_k2\import\ ?

The only other thing I can think of is the PHP version, I see you are on PHP 5.4.17, I am on 5.4.10, maybe that is a difference.
Kind regards,

RolandD

=========================
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. # 8
Accepted Answer Pending Moderation
I am so sorry, I'm afraid I'm getting the same result -- my extra fields are still empty.

The *only* other thing I can think of is, although my extra fields are text fields, they contain numerical values (i.e., Part Number and Price). Would that be what is confusing things?

Attached is the log…
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello,

I am really surprised because I used this same code on another site and that imported fine. In addition ran it on my test server and it imported too.

What I have done is, removed the code that sets the default value for empty fields and let's see what happens then.
Attachments (1)
Kind regards,

RolandD

=========================
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. # 10
Accepted Answer Pending Moderation
Hi,

I did as you suggested and I'm afraid I still get the same results. No data imported into the extra fields.

Attached is my debug log from the last import.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello,

Is it possible you accidentally attached the older patch?
I did check that and it is the correct patch.

Something else, I see you have set Autodetect delimiters to Yes but your CSV file only contains a field delimiter not a text enclosure. Try setting the Autodetect delimiters to No and fill in a comma as field delimiter. Run the import again to see if that helps. If not, we can add some debug info for the import process.
Kind regards,

RolandD

=========================
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. # 12
Accepted Answer Pending Moderation
Hi,

Indeed I installed the newer patch the first time around and I just re-installed it for good measure. I'm afraid I still get the same results -- my extra fields are empty. Is it possible you accidentally attached the older patch?

Attached is a new debug log in case you need it although I suspect it has the same info as the last one.

BTW also ran the Update Available Fields command…

Thanks.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello,

I believe you have an older patch, there was a problem when inserting new items with custom fields. The custom fields would process but reset before insertion. Please check if you have the correct patch file that I posted here. You may want to re-upload the patch file to be sure.
Kind regards,

RolandD

=========================
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. # 14
Accepted Answer Pending Moderation
Hi, Roland:

I solved my initial problem -- indeed, it was a case issue. I assumed the field headers in my CSV file needed to be lower case, but once I matched the case with how the extra fields were represented in K2, I was home free.

Now, I have stumbled upon another issue:

My title and category data import just fine, but my extra field (Price, Part Number) data won't import. These are just text fields, so they shouldn't be a big deal.

I've done the following:


  1. Made sure the appropriate extra field group is associated with the category.

  2. Updated Available Fields in CSVI.

  3. Under Import Options, I added my two extra fields and made sure the Template Field Name extra_fields was associated with them.



Attached are my latest test CSV file and debug log.

What am I doing wrong? :(
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,

Please post your debug log also for me to check. You can see these extra fields in the list of available fields for the Item import?

If so, make sure the capitalization is also matches. The field partnumber is not the same as Partnumber.
Kind regards,

RolandD

=========================
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. # 16
Accepted Answer Pending Moderation
Okay, I installed the patch -- and ran Update Available Fields -- and I come up with the same results. It still doesn't seem to like the two fields I have designated as extra fields.

And so I am attaching both a screenshot of the error log and the CSV test file I am trying to import.

Thanks as always.
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hi, just for the record, I did indeed run the Update Available Fields command…

I will install the new version of your patch, do another test import, and get back to you with the results.

Stay tuned…
  1. more than a month ago
  2. RO CSVI
  3. # 18
Accepted Answer Pending Moderation
Hello,

You need to run the Update available fields after you added extra fields to K2, this is needed so you tell CSVI that there are new fields.

Please do the update and run your import again. If it doesn't process the extra fields, please post your debug log.

Thanks.

[EDIT] I found an issue with the extra fields import that needed addressing. Please find an updated patch attached. You can load it over the existing one.

[EDIT2] An updated patch, for importing new items
Attachments (1)
Kind regards,

RolandD

=========================
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. # 19
Accepted Answer Pending Moderation
Accidentally double-posted… my bad!
  1. more than a month 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!