1. dyfrig
  2. RO CSVI
  3. Saturday, 18 November 2017
  4.  Subscribe via email
I am trying to set up a template for the following scenario.

I'm trying to import a csv file with the following fields :

sku, author, publisher, flag

sku is a J2Store product field whilst the other 3 fields are Joomla Custom Fields.


Articles_Edit.jpg

All the sku values should already exist and the import is to fill the custom fields.

Is this possible? If so how do I set up the template?

Is this query better directed to J2Store? If so please let me know.
Accepted Answer Pending Moderation
Hello,
Is this possible? If so how do I set up the template?

To import Joomla custom fields into J2Store you can use Joomla Article import instead of J2Store product import. You need to use title field instead of SKU in your import file to import these custom fields.
Kind regards,

Tharuna

=========================
If you use CSVI, 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
Sorry for delay in replying. I will need to rewrite the script which creates the csv file so as to include the title to make this work, I was hoping that I could avoid that but if I can't then so be it.

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

You don't have to rewrite the script I think. If there is no title the SKU field will be used, so you can use the SKU as title. Unless that is something you do not want, in that case you will need the actual title.
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
I am still having problems with this. The 3 custom fields are not being updated. The csv file consist of 4 fields -

Title, Awdur, Cyhoeddwr and Fflag (I renamed the 3 custom fields back to the Welsh equivalents just to be sure of avoiding clashing with Joomla author etc).

I exported these fields using CSVI Pro (no problem). All titles were exported (9529 records) and the 3 custom fields were blank as expected. I then added the data for the 3 custom fields into the CSV file. For testing purposes I deleted most records leaving 8 records with no peculiarities (accented characters etc).

The test file is shown below

title,awdur,cyhoeddwr,fflag
Achub Anifail: Antur Arctig,"J. Burchett, S. Vogler",Gwasg Carreg Gwalch,N
Achub Anifail: Targed Teigr,"J. Burchett, S Vogler",Gwasg Carreg Gwalch,N
Achub y Cwm,Gwen Redvers Jones,Gwasg Gomer,N
Across the Straits - An Autobiography,Kyffin Williams,Gwasg Gomer,N
Act It Out! - Sglod and Chips (Play Pack),Ruth Morgan,Pont Books,Y
After Babel,Christine Webb,Cinnamon Press,N
Allez Cymru - Wales at Euro 2016,Gary Pritchard,St. David's Press,N
Alun the Bear in the Castle,Morgan Tomos,Y Lolfa,N

I tried to import this file = preview below
CSVI - Import - preview.png

All of the records were skipped i.e. not recognised as existing as shown below.
import log details .png

What am I doing wrong? Debug Log attached.
Attachments (3)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
In your import template settings on File tab you have set Skip new items to Yes, set it to No and then run the import. This option will skip the records which do not exists, since your records are already there and need to be updated you should be setting this to No.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
No - that doesn't work. If I do that new articles are created with all fields blank except title and the 3 custom fields. Log attached.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,
Thank you for posting the debug log. In CSVI for importing Joomla content the needed fields are alias and category_path(this is explained in the document i linked earlier). These fields are used to find the matching article and update if the article is already there else a new record is created. If you don't have these fields in your import file, you should be seeing a error message "Missing required fields" and that did not happen with your import. Checking more on the import there were few issues which we found and fixed it with the attached patch file. Please load the attached patch file and run the import by adding title or alias and category_path or catid field along with your custom fields. I would suggest you to run the import with few records initially and if everything goes good you can import the rest. Don't forget to post the debug log and sample import file if you still see any issues.

patch_content_2017_11_27.zip
Attachments (1)
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Thank you for your reply. When I exported the required fields I realised that most products did not have aliases as they had been imported using J2Store's Simple CSV Import without an alias filed as I thought they would be created automatically in Joomla as is normally done when you enter an article manually.

I realised that the simple answer was to make the aliases the same as the sku for all the books (sku = isbn for books). This seems quite appropriate for the books which are the only products involved in this import. I created an import file to do this and imported it using J2Store's simple csv app. This then enabled me to use CSVI to export the required alias and category_path fields, add the 3 new fields by matching the alias field to the sku and then import it back. Job done!

This will also mean that I can automate this process as originally intended with only a minor change to the script.

Thanks for all your help.
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello,
Thank you for your reply. When I exported the required fields I realised that most products did not have aliases as they had been imported using J2Store's Simple CSV Import without an alias filed as I thought they would be created automatically in Joomla as is normally done when you enter an article manually.

Not sure how J2Store simple CSV import works but with CSVI J2Store product import if there is no alias field it is populated automatically.

I realised that the simple answer was to make the aliases the same as the sku for all the books (sku = isbn for books). This seems quite appropriate for the books which are the only products involved in this import. I created an import file to do this and imported it using J2Store's simple csv app. This then enabled me to use CSVI to export the required alias and category_path fields, add the 3 new fields by matching the alias field to the sku and then import it back. Job done!

Glad to know that all works for you now. Would appreciate if you can give us a review on Joomla Extension Directory :)
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
  • Page :
  • 1


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