CataBlog supports both importing and exporting database data for backup and automated catalog creation. These features rely on specifically formatted XML and CSV files.
To export your catalog you simply go to the CataBlog Options Panel and switch to the export tab. There you may click either the Save XML BackUp File or Save CSV BackUp File button to save a backup of your catalog data in the appropriate format. When you need to make lots of edits you may use these files as templates and then re-import the modified version, replacing your current data. Please note that your server will need to support the PHP function fputcsv() for CSV exports.
Importing a catalog can be a little more difficult, but it's still easy enough. First go to the CataBlog Options Panel and switch to the import tab. Once there you must select a XML or CSV file to upload. Make sure your file has the appropriate file extension (.xml or .csv) and that it matches the format displayed below. Once you have selected your upload file, you may choose to wipe the database and remove all data before running the import option by checking the Replace All Data checkbox. If you do not check replace all data then your imported catalog items will be appended to your current catalog. Please note that your server will need to support the SimpleXML PHP extension if you want to import data using XML format.
<?xml version="1.0" encoding="UTF-8" ?> <catablog_items date="2011-02-01" time="20:02:25"> <item> <order>10</order> <image><![CDATA[theosbirthday-1296495847.jpg]]></image> <subimages></subimages> <title><![CDATA[Theo's Birthday]]></title> <link><![CDATA[/a/relative/link]]></link> <description><![CDATA[blow out the "candles" buddy]]></description> <categories> <category><![CDATA[theo]]></category> </categories> <price><![CDATA]></price> <product_code><![CDATA]></product_code> </item> <item> <order>5</order> <image><![CDATA[babyeyes-1296495877.jpg]]></image> <subimages></subimages> <title><![CDATA[Theo's Baby Eyes]]></title> <link><![CDATA]></link> <description><![CDATA[isn't theo super "cute"]]></description> <categories> <category><![CDATA[cute]]></category> <category><![CDATA[theo]]></category> </categories> <price><![CDATA[8.43]]></price> <product_code><![CDATA[product-code]]></product_code> </item> <item> <order>3</order> <image><![CDATA[thumbsup-1296497019.jpg]]></image> <subimages> <subimage><![CDATA[a-subimage-1296495877.jpg]]></subimage> </subimages> <title><![CDATA[Thumb Up]]></title> <link><![CDATA[http://www.fulldomain.com]]></link> <description><![CDATA]></description> <categories> </categories> <price><![CDATA]></price> <product_code><![CDATA[SKU#45561$3]]></product_code> </item> </catablog_items>
order,image,subimages,title,link,description,categories,price,product_code 10,theosbirthday-1296495847.jpg,,"Theo's Birthday","/a/relative/link","blow out the ""candles"" buddy","theo","","" 5,babyeyes-1296495877.jpg,,"Theo's Baby Eyes","","Isn't theo super cute","cute|theo",8.43,"product-code" 3,thumbsup-1296497019.jpg,a-subimage-1296495877.jpg,"Thumb Up","http://www.fulldomain.com","","",500,"SKU#45561$3"
I’m working on importing 580 records. I’ve imported the 580 images and rescanned the image folder. Then I tried importing the csv document, the first three records of which looks like this:
(I also tried with 2 commas appended to each entry)
Every time I get the following error message:
Error: Item had no primary image name and could not be made.
I also tried with fewer records. I’ve made sure that the image names in the csv file and the actual image names are the same.
Yeah, I’m still working on this.
Since the CSV format changes a little from version to version when features changes, I would recommend exporting a new CSV file from CataBlog after you rescan your original images folder. Here are the steps:
1. Upload all images and rescan the image folder, thus creating a catalog of 580 records.
2. Export a CSV format file from CataBlog Options > Export
3. Modify the Exported CSV file in an editor such as Excel, make sure not to change the image column. Copy and pasting or even just modifying your original CSV to match the exported one’s format also works here.
4. Import the modified CSV file while also making sure to check the replace all data checkbox.
That should do it. If you are going to be working with that large of a catalog I would recommend that you have a fairly decent web server (not cheap hosting) without database query limits or a million other users on the same server. Good luck and hope that clears up your issue.
hi zach thanks a lot for this coool plugin!!!
i’m trying to import a csv file but i’m new to this and i’ve this warning:
” Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /phi/wp-content/plugins/catablog/lib/CataBlog.class.php on line 2307 ”
and then in the result it says:
“Error: Item had no primary image name and could not be made.”
i would like to know what’s my stupid (i hope) error!
hi zach i’ve solved ! it was due to some character but i’ve solved now! thankssss
Awesome, love it when that happens. If you have time could you please describe in detail exactly what characters you removed/changed to fix the problem. Cheers!
hi zach ,
i used the word “character” but i meant some text i’ve wrongly copied with useless commas.
i’m now playing with all the features and it’s very very cool man!!
2 little questions if you have time:
– can i fill the PRICE with words or does it accept only numbers?
– is possible to modify the lenght of TITLE ? i’ve some long title but they’re cut during importing
thanks again mate!
Glad to hear you are enjoying CataBlog, let me answer your questions to the best of my ability.
1: price must be a number, if you want to use words I would suggest using another field such as product code or putting the price directly into the item description. Just like PayPal or other shopping cart products, price must be a positive number.
2: The title of the products should be limited to 255 characters. I can’t remember off the top of my head if this limitation is part of WordPress or just CataBlog. Perhaps you can put part of your title into the description, this field accepts HTML tags too, so you can format your description however you want.
I get the same error and can’t fix it
Error: Item had no primary image name and could not be made.
My CSV looks like this:
I’m wondering if the import function can be used to add data to Catablog from a different (eg Microsoft Exel) spreadsheet? I tried to do this using both XML and CSV files however I couldn’t get it to work.
Am I doing something wrong or is this simply not an option?
An up-date on this, I got the images to appear but not the text data from the other DBs. Any reason for this?
Hi, I’m trying to import a .csv file but keep getting this error:
The website encountered an error while retrieving http://mysitenamehere.com/wp-admin/admin.php?page=catablog-import. It may be down for maintenance or configured incorrectly.
The csv file is formatted correctly, but this is happening every time.
Any help much appreciated.
unable to import a simple test file of only 3-4 records. what am i missing?
it looked like i needed up upload the images first via Add New, and then run the Rescan of the original images folder. and then i followed your advice to discover the current CSV format of the day by exporting, and adjusted my CSV accordingly. but still when i try to upload the actual item data via CSV, i get the same “Error: Item had no primary image name and could not be made.” also tried making sure that the images had the same IDs (“order”) as their corresponding lines of the import file.
my problem must be something simple? i had really hoped your elegant little plug-in would be the perfect solution for this project.
What are you using as a CSV editor? Are you sure it is correctly formatting your CSV, you should have a column labeled
image, preferably as the first column in your CSV file.
CataBlog does not check if the file really exists, so you problem lies strictly with the CSV file itself. I cannot help much more without an example of the actual CSV file.
thanks so much for your response.
the CSV is coming from a perl script, since i’m reading in the fields from another db export and writing them out in the order that CataBlog wants. …but your question does identify my problem, which was that somewhere along the way i stopped outputting a first row with column headers. so my test import now works.
i notice, though, that my CSV file’s “order” field gets replaced by a default ordering on import — is there any way to hold onto the original db IDs as “order”, or should i just trust that the product-code is the only identifier i’ll really need anyway?
I believe if you change your Perl script to order your CSV file into your desired order and then reimport the data into CataBlog you will have your order.
Just a guess, but try it out.
it retains the order, but not any numbers i attempt to specify as belonging in the ‘order’ field. but we have decided those IDs are not important for our purposes after all. thanks. 🙂
I believe the latest version, CataBlog 1.4.1, should now use the order value from the CSV file. Also, the new version exports the catalog item’s id into the CSV file. This allows CataBlog to update catalog items upon the next import instead of appending or overwriting the existing catalog items.
I am currently using jigoshop plugin for a new wordpress site. But Jigoshop does not have import/export feature so that will be a pain to enter all items in the site one by one. I am curious with your plugin. Can we import all items into shop? Thank you.
I don’t know anything about jigoshop so I can’t compare CataBlog to it, but I can say that CataBlog has an import / export feature. Simply create a few items and then export your catalog in either XML or CSV format to see how to format your import file. Good luck
hi zach great plugin i,m using exel to creat my csv files which i,m importing into the catblog options but i can,t seem to get the price to display some help would b appreciated
I might try this, as Excel has so many options when it comes to CSV and this has always worked for me. Simply create a few catalog items in CataBlog with all fields filled out and then export a CSV file from the CataBlog Options. Open this newly exported file and modify it to match your needs, including price etc. Make sure price does not include any symbols or characters, just a decimal number. Now save your file, confirm that you might loss excel specific formatting, and upload your new CSV file to CataBlog.
Good luck and let me know how it goes.
This is a great plug in. I would ideally like to be able to include images in an import process. Perhaps whereby in the import file an http path is specified as the source of the image, and the plugin grabs the image from there. Any possibility of this, or any idea of the best kind of work around?
You may upload your images on to your server at /wordpress/wp-content/uploads/catablog/originals/ and then make sure that the name of the image file is in your CSV or XML file for importing. I will most likely not be adding a feature to pull images from other websites, if you want to do that write a script on your computer to do it and then upload the images your script downloaded to your server and use CataBlog that way. Good luck.
It a great plugin. I am import list of 990 products, which do get imported. However when I scan the images, it hangs at showing “Processing Thumbnail Images…” and doesnt move forward. What could be possibly wrong? When I imported a test set of 2 images, it did work.
Arun, are you sure you uploaded the 990 image files with matching names from your CSV to your web server. Those images should be copied into your
You were right, lot of files were missing.. It works after files are provided. Thank you Zach.
I installed Catablog on my WholeHeart.org “Our Books” page and it worked nicely to display about ten books. Since I needed to duplicate the page on another blog, I exported the content to an XML file and imported it back into my wife’s ITakeJoy.com “My Books” page, then manually uploaded the same book cover images. After some trial and error, it’s all there, but there’s a problem.
Problem: The book cover images on the ITakeJoy.com page display only a portion of the cover in a square frame, unlike the WholeHeart.org page which displays the full cover in a proportional frame. How can I get the cover images on the ITakeJoy.com page to display the full cover in a proportional frame?
Is this a function of the theme (I use StudioPress Genesis themes)? If so, I’m guessing I’ll need to know HTML or CSS to fix this problem (which I don’t…yet). Just point me in the right direction and I’ll figure it out from there. Thanks.
Did you check the thumbnail tab in the CataBlog Options Admin Panel are the same in both installations? Also, after verifying they are the same, you should regenerate thumbnails in the systems tab of CataBlog Options Admin Panel.
Thanks, Zach. “Keep Aspect Ratio” was unchecked, and all was put right when images were regenerated. Worked like a charm. Appreciate the assistance. Pressing on.
Great plug in, Has helped me a lot so far.
Is it possible to add multiple categories through the csv import? and also is there a way to upload a csv with new information that edits the already excisting items? Emptying the database everytime is not optimal
To add to the database instead of overwriting it you should do this:
1. Export your current database in CSV format
2. Add your new rows to the bottom of the CSV file, making sure the id column is left empty in your new items.
3. Import your edited CSV file making sure “Erase All Data” is not checked.
I knew of this way of adding but if I want to bulk change links or categories in already existing items. Is this possible with editting the old excel or should I add them as new items/edit them in catablog itself?
If the row in the CVS file contains an id that matches a CataBlog item in your database then it should modify the exiting item instead of adding a new one.
In my experience this (updating of existing items) is not working !
I have exported my catablog library in order to update all items:
– modifying catalog names
– adjusting RRP prices
(I used Excel-VBA and the XML format – works great)
(DON’T try using CSV if your items contain dots or other punctuation marks)
The idea was to import all items with the modified information.
Leaving my galleries intact.
Unfortunately I could not achieve it – all items had new information (supplied by me) but also a new item-id (supplied by the import process)
I presume this “replace option” caused the old items-id’s to be deleted.
That in turn caused the old galleries to become empty
(although the item-count still showed the old number of items
in the gallery but with “edit” nothing showed up.
After adding the ‘old’ items again and using the ‘save’ button
the count was ok)
Imported the (whole) library you have 2 options:
1) Checking the “replace-all-data” option:
all items are added to the library with a new item-id
the old item-id is used to delete that old item-id
2) Leaving the “replace-all-data” unchecked:
All Items are added to the library leaving you with a copy of the original.
Now only the new items have modified information and the galleries
have to be adjusted: remove old items and add new items
Last but not least:
1 – pls add a ‘preview’ button to this comment-section
2 – this entry-box can be enlarged but becomes hidden behind
Nevermind found out how to seperate the categories. Second question remains
is there a limit for how many entries I can upload. It says import is finished successfully but it only imports around 1200 of 8000 products. Anyway thanks for this great & free plugin.
It’s not that bad I just need to do multiple uploads… just can’t find the reason
Okay I have imported all items now but with so many entries the regenerate images function does not work anymore… it just returns an empty page. Any idea on how to solve this?
Intereseting, I wonder if your database is timing out. I believe regenerate needs to fetch the id or image file title of each catalog item before it starts processing. So your database may be to slow to fetch 8000 names within its configured timeout, depends on your server / hosting solution.
The upper limit is based on your database and web hosting provider. Basically the upper limit is the same as the number of WordPress posts you might have on a site…hundreds are pretty easy to support, thousands might require a VPN or dedicated server solution. On my local computer I have topped 10k catalog items.
Hello Zach, how are you? Sorry that I am replying through here but I know that you don’t want people submitting private e-mails to you. So I thought I would comment here and I hope you don’t mind.
Your plugin is doing very well and it is a great plugin and as you know I am doing my best to help you with any questions people might make or request they might make. I was wondering if you could release a version that said it was compatible with WordPress 3.5. It would look great for the plugin.
Thank you kindly for this great plugin.
Manuel, that is a very good idea. Right now I’m also playing with the idea of releasing a new feature for CataBlog. We will see, I am also super busy with other stuff.
Look for a “3.5 Compatible” release sometime this week 🙂
Hi Zach, that is great news. I am sure everyone will be very happy with your new release. As always I will keep on supporting your blog and plugin forum with any questions and queries people might have.
Looking forward to the release.
Thank you kindly
Hey Zach, when i do an export and import, does the import replace the template settings? i mean, i have created another domain with wordpress and i also installed catablog on the second domain so im trying to export my catablog items to the new domain but i have made some changes in the catalog template on the second domain. My question is if this import will erase the changes i have made in the template. Thanks
The import should only create catalog items, it will not create galleries or change your templates. It also will not import any settings in the options panel.
Please note that you will also have to copy over at the very least the original images for all your catalog items. You can also copy over the thumbnail and lightbox images if you are using the same resolutions. Otherwise the regenerate command in the system tab of options can recreate your thumbnail and lightbox images.
Thanks Zach, one last question: How can i change the permalink of each page because im using the permalink as the link for each item and it still has the link of the old site. Is there any way to automatically update these links by clicking a button or do i have to do it manually item per item?
The permalink is automatically generated using a number of factors: your site’s domain, catablog’s permalink settings and the title of the catalog item. The permalink should be different from one site to another, at least the domain 🙂
I would check the catablog permalink settings in options, make sure those are correct. Also make sure you are not using the default permalink structure in wordpress, catablog permalinks don’t work well with it.
If you are talking about the link field for each catalog item, I would recommend editing the exported file and remove the link values before importing them. A csv file can be edited in Excel quite easily.
Thank you very much Zach! I’ll do that!
This may seem like a remarkably dumb questions but….do I have to upload the images first? If so, where should I put them and do I need to generate the thumbnails myself?
I tried to just put the URL of the images I wanted in the csv file (stored on amazonaws) but the images didn’t upload when I uploaded the csv file.
Yes, you need to upload the image first. You should upload the image in the “CataBlog Add” panel of your WordPress site’s admin section. All thumbnails will be auto generated to the specs of your CataBlog setting.
Steve, if you want to do a CSV import, you should make sure the image column matches the file name of an image file in your wp-content/uploads/catablog/originals folder. You can auto generate your thumbnails with the regenerate command in the System tab of CataBlog Options.
We are getting acquainted with your great plug in. It appears that when we wish to bulk load multiple sub images via a .csv those sub image names need to be separated with a pipe ” | ” delimiter. The data that I am working with utilizes space delimited values for the image names. Is there an option to use a space delimiter rather than the pipe delimiter? Thanks in advance for your consideration.
Great plug in so thanks. I uploaded items with a publish date set in the future, Will they automatically be published? And will this cause any possible problems furthermore?
Hello Ruben, the answer to your question is no there should be no problems with future published posts.
This should not cause any problems.
I hope this puts you at ease.
I created some custom fields/tokens on the codes of the plugin. I exported and imported from this site to a new one and all the default fields transfered correctly but the ones i had created didn’t transfer the info inside them. I checked the XML and CSV files and this info is not there. So, my question is: Which file is the one in charge of exporting the data to the export CSV?
I was wondering if it’s possible to edit the plugin to make it have more colums (and corresponding tokens) and if so if it’s doable.
Also I’m looking for a way to transform the catablog pages into normal wordpress pages, any thoughts on that?
Hello Ruben, yes you can add more columns using a custom template. Here is a tutorial that might help you http://mbrsolution.com/tutorial/catablog-add-columns-tutorial-part-6.php
In regards to your comment
What are you trying to achieve?
Thanks for this plugin.
I have some problem with special characters.
Data are exported without managing special characters. So,for example, this character “à” is not exported correctly. The problem is that it’s not possible to re-import data.
Another question, how it’s possible to modify permalink? I have two product with same name and the permalink has to be different.