1. OPERCON
  2. RO CSVI
  3. Monday, 15 June 2015
  4.  Subscribe via email
Step by step.
Make file for k2 import.
extra field is a country manufacturer. in k2 extra field is drop down - it has a dictionary, so this value, when exported or imported should have a dict id value {""id"":""4"",""value"":""1""} - field - Country (id = 4), U.S.A (id = 1)
what should i do, if i don't know an id in advance? i know only text value {""id"":""4"",""value"":"U.S.A"}
Accepted Answer Pending Moderation
Hello,

Can you post some screenshots of how you have setup this field? I am not entirely sure what your field is. I understand what you want to do but I don't know the field setup.
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. # 1
Accepted Answer Pending Moderation
I have a template of complete export from my k2 (attached). It can be successfully imported to my k2 either.
I am trying to create this file manually, using another source of information.
Please, pay your attention to the field "extra_fields". It's value is some kind of array:
[{"id":"19","value":"1"},{"id":"20","value":"1"},{"id":"21","value":"1"},{"id":"22","value":"1"},{"id":"23","value":"1"},{"id":"24","value":"1"},{"id":"25","value":"1"},{"id":"26","value":"1"},{"id":"27","value":"1"},{"id":"28","value":"1"},{"id":"29","value":"1"},{"id":"30","value":"1"},{"id":"31","value":"1"}],
where, as i can understand id - is an id of the dictionary of k2 (dictstruct.jpeg - 19 dict is highlighted. sorry, interface is Russian:)), and value, is a value.
As dictionary on dictstruct.jpeg is of "dropdownlist" type, it's value is an id of dictionary value (dictvalues.jpeg).
So here is my question:
If i don't know in advance, if the goal-site of my k2 import has needed dict value, is there any way to create it in a moment?
for example, if i'll pass not {"id":"19","value":"1"} but {"id":"19","value":"AD Medicine"}(or some other way, maybe you will advise)will import script find it or create in a dictionary needed value automatically?
Attachments (3)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,

CSVI supports importing extra fields as normal fields, see the Import K2 items with extra fields tutorial. So you should not be constructing the encoded value yourself.

Attached is a patch file you can load and after that you can export the field as a regular field.

As for creating values on import, I can look at that but it will only be added to CSVI 6.
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. # 3
Accepted Answer Pending Moderation
Thank you. I'll try to import them as regular fields:)

I have another question: if i'll export them from k2 without patch - will it be possible to import them to virtuemart after that?)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Excuse me,
i've tried to import, result was 38 items successfully updated(attached report screen), but no items really exist in k2(
maybe, you'll advise me where to look at?
File for import is attached
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Unfortunately it's impossible to attach file when editing post, so attach in here what i'm trying to import
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,

You can attach a file when you click Reply, the Quick Reply has no option to attach files.

You don't see anything because you are using fields you should not be using. Don't use the id field. Read the Import K2 items tutorial on what fields you need.
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. # 7
  • Page :
  • 1


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