1. jimmywiddle
  2. RO CSVI
  3. Tuesday, 21 July 2015
  4.  Subscribe via email
Hi, Basically im trying to use an import csv file which doesn't contain any of the standard fields:
"title";"alias";"category_path";"introtext"

instead id like title to be made up from a combination of extra fields and the category path to be the same for all items imported.... i dont need the introtext or alias (alias will be autogenerated from the title right?) and all items imported need to be auto published.

thanks in advance
Accepted Answer Pending Moderation
.
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello,

I see you adjusted your message, not a problem but I just wanted to say that you can always ask for help if things don't work out.

Basically im trying to use an import csv file which doesn't contain any of the standard fields:
Those fields are required for a reason of course :)

instead id like title to be made up from a combination of extra fields
That can be done by using the combine function in CSVI. There is even a tutorial for that, the Combine multiple fields into one tutorial.

category path to be the same for all items imported
That is possible as well by adding the category_path field with a default value. This field doesn't have to be in your import file as long as the number of fields in the CSV file is less than the fields you assigned to the template. Let's say your CSV file has 5 fields, the first 5 fields assigned to the template should correspond to the 5 fields in your import file. Field number 6 can then be the category path with the default value.

i dont need the introtext
You can leave that out, your articles just won't have any content.

alias (alias will be autogenerated from the title right?)
No, the alias is used as unique identifier for your content. Without this, CSVI won't have any clue which item to update/add. If you want I can create a patch for you that will generate the alias based on the title.

all items imported need to be auto published.
The same goes here as for the category_path, you can add the published field with a default value of 1 or Y. Just add it to the end of the fields list assigned to your import template.

Let me know if you have any further questions.
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
Hi, Thanks for your reply and help, i got everything I mentioned in my post working now, except the alias, there is no data in the csv file for this, yes if you can create this patch so its autogenerated from the title it would be wonderful thanks!
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,

I will work on the patch and it should be ready tomorrow. Will post it here when done.
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
Many thanks! :)
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello Jimmy,

Attached is the patch file that turns the title into an alias on import. You can load the patch file and then run your import and the alias should be created from the title.

Let me know how it goes.
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. # 6
Accepted Answer Pending Moderation
Many thanks! Looks to be working good.. im just doing some further testing and will let you know.

My only concern is, if there are 2 identical titles, will the aliases also be identical? which would obviously cause an issue.
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
If you have 2 identical titles, you will get identical aliases. Which will result in the latter updating the former. In K2, you can't have duplicate aliases either as you won't be able to save the item.

In a future release I will deal with duplicate aliases as well.
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
Hi, Ok thanks, as the duplicate alias is an issue, im trying to use 3 fields in the title to ensure its not duplicated (PropertyArea, PropertyPostcode & PropertyID) but i really cant work out how to do this after spending much time on it and following this guide http://www.csvimproved.com/en/support/questions-and-answers/873-combine-multiple-fields-into-one

In the tutorial I see no fields or anything assigned to the combine field, I dont see what purpose this has, to be honest id really appreciate some idiot-proof instructions, thanks :)
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello Jimmy,

So I believed the instructions were idiot-proof :)

im trying to use 3 fields in the title to ensure its not duplicated
Show me how you have setup your fields. The PropertyArea should be the title field and the other two must be the combine fields. After that you must select the two combine fields in the title field.
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
Afraid to say I still cant get the combines title field working (im no idiot! lol), currently its importing no title.

Please see screenshots for the settings, would really appreciate your advice on where im going wrong?




ALSO i wanted to ask if theres a way to get items/records that dont appear on the CSV but were previously (and are on the frontend of the site) to be deleted or unpublished?
Otherwise it would be a matter of having a 'published' column on the csv and values for 1 for published or 0 for unpublished for each record, right?
Attachments (4)
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Afraid to say I still cant get the combines title field working (im no idiot! lol), currently its importing no title.
Don't be afraid, I won't hit you :)

So the images gives me some ideas. For the combine fields I see you have set the Template field name, that is incorrect. That needs to be emptied. You didn't include an image of all the fields you setup but the custom field should be place in the list where you have the PropertyPostcode field and same for the ID field.

For example your CSV looks like this:
Title,Postcode,ID,Room8Price
My,2342,2343,80
You want to combine the first 3 fields, your template should have this field layout:
Title
combine
combine
Room8Price

So, don't create new fields but put the combine field in the existing location of the postcode and id field.

Hopefully that is clear.

ALSO i wanted to ask if theres a way to get items/records that dont appear on the CSV but were previously (and are on the frontend of the site) to be deleted or unpublished?


ALSO i wanted to ask if theres a way to get items/records that dont appear on the CSV but were previously (and are on the frontend of the site) to be deleted or unpublished?
You will need to run an export of all your items and then re-import them with the published field set to N or 0.
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, Still cant get it, dont know how long I have spent on this now.

For the combine fields I see you have set the Template field name, that is incorrect. That needs to be emptied.

I removed this now, but there are now no settings for the combine field ..nothing to associate it with the field I need.

Any chance (to save anymore of these posts) you can quickly login to my admin and sort this out, Im sure its the smallest detail thats incorrect.
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello,

Asking for the details was going to be my next question ;) Send me a private message with the login details and I will take a look. Also include FTP details please in case I need to figure out why it isn't working.
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
Many thanks for your help Roland, much appreciated.. im curious to know how you did it/what i didn't do? but dont want you to spend extra time explaining.

Just one last thing... I just need a space inbetween the fields that combine to make the title ... currently there are no spaces inbetween... many thanks again!
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
You can compare the template against the tutorials I linked earlier, the majority of the problems was the incorrect order of the fields and the dual purpose of the 3 fields.

To add the space, you can modify the title field and set the combine character to a space.
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
Thanks again for your help! Great support! Great component! :)

Imports working great now, only thing is when reimporting it creates all new k2 articles rather than updating ones that currently exist, how can I get it to update the k2 articles that exist?
  1. more than a month ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Jimmy,

Please post your debug log as requested at the top of the page, so I can see what happens during the import. The item should be updated based on the alias field.

Since the first title did not have a space and now it does. Check if the aliases are the same. Otherwise run the import again and check if it really adds it or this was a one-time off.
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. # 18
Accepted Answer Pending Moderation
Thanks again!

<removed debug log>
  1. more than a month ago
  2. RO CSVI
  3. # 19
Accepted Answer Pending Moderation
Jimmy,

Please post it as a zip attachment, the text is way too long to be pasted into a message as it is cut off.
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. # 20
  • Page :
  • 1
  • 2


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