Attention! Don't forget to make an actual backup before making any experiments with your website. It greatly saves time, nerves and money.
Starting with JBZoo 2.0, we have our own import/export system that uses CSV format.
In this article we'll examine settings and the process for items only. All this information is relevant for categories too. But before we start, you should know some important things.
You can see an example with default options for LibreOffice on this screenshot. All other programs have similar options. Pay attention to outlined options.
You can easily find import button in the tools section.
On the first step we set parameters only for CSV file recognition.
Usually, these settings shouldn't be changed. You only have to load a file and continue to the next step.
On the second step you should specify the correspondence between the CSF file columns and item fields. You will see a list of columns from your CSV on the left and item fields of a specific item type on the right (after you choose an item type).
Some very important options are listed at the top.
It is mandatory to make a relation of CSV fields with an item type using this option. Otherwise, new items will be created because a search for the key would not provide results.
If an import process will be unable to set relation by key, new item will be created.
On the third step an actual import process will start. Do not close this window until you will see a message that everything is completed.
Attention! On the last step, after 100% there will be an additional server request that will either delete or hide items (it depends on import settings from the second step). It could take some time if you have a lot of items. So do not close this window too early.
If you suddenly see an alert message, don't worry. It is an error (not necessary because of import). Just make a screenshot and show it to the tech support. In this case import will stop and it would be better not to restart it until the problem is solved.
Almost any type of ZOO or JBZoo element has its own data format. So it can affect the format of data in CSV for the import. In order to be sure, just make an export of an item that you need and use it as an example. Below we'll examine special data types in JBZoo.
Starting from JBZoo v2.0 it is recommended to use JBPrice Advance element for a price fields. It supports different filling methods.
Let's assume that we want to fill prices in this way:
For the first cell (basic information):
For the second cell (price variation):
This format is the longest one but it can fully change element values.
As you can see, it is a set of key1:value1;key2:value2.
You don't have to specify all keys - change only what you need. For example, you can skip "currency" value and the import will keep default currency value (as in element settings). Also, if some value is empty, you can skip it.
In our example there is param1 but there are no param2 and param3. Because they can be skipped.
Special symbols such as ":" and ";" are used as delimiters.
If these symbols are used in the description, you should replace them with %col% or %sem% respectively.
This format is supported in order to keep the possibility to work with old price element and to make import easier. All missing fields will be filled according to default values (e.g. stock will be infinite) or will betaken from element's settings (e.g. currency).
HO9754|||1|||14800|||Item description - sku, availability flag, price, description.
HO9754|||14800|||Item description - sku, price, description.
14800|||Item description - price, description.
14800 - only price.
Important information regarding prices!
You can specify that an item belongs to a category by several means.
Example of a full variant
Name 1|||alias-1///Name 2|||alias-2///Name 3|||alias-3
Defines a full path to a category to which this item belongs. Last one will be set as its category. I you need to specify several categories, then category field should be multiple.
Import will search through categories by alias and if it will find nothing, by name. If nothing is found, category will be created.
Example of a shortened variant
Name 1///Name 2///Name 3
It is same as full variant but without aliases.
Example of a simplest variant
This variant specifies only final category, without nesting. If the category exists, its nesting will not change and an item will be attached. Otherwise, category will be created in the application root.
Boolean values. Usually they are used for the simplest switches. To turn on and off comments, for example. In order to set a positive value, you can use such values as 1, y, yes, on and any positive numbers. Everything else is treated like no
Date fields. It is recommended to set them in a Y-m-d H:i:s format. 1999-12-31 23:59:59, for example. Any other format which is supported by PHP function strtotime will do as well.
Related item or category. Fields that point to the relation with a different item should contain its alias. It's not possible to make a relation using ID.
Author (user). You can specify either ID of real user or some random word that will be saved as an author name.
Country. For the country element you should specify a two-letter code. US for the USA, for example.
You can find a full list of all countries in this file:
Galleries, images, files. There are some elements that can store a path to a file or a folder. You should specify the same path like in the control panel for such elements. Preferably, without unnecessary slashes. Existence of files or folders is not checked during the import.
Cascade select. Each cell should point to one of the variants of a cascade select. Example:
USA|||Phoenix|||Tempe USA|||Phoenix USA
Joomla module and Widgetkit. Strict relation to a Joomla module ID or a widget ID.
Visit our special JBZoo tech support forum which is specifically meant for JBZoo so the priority of the response and its promptness are much better there than in any other place. With inactive account with a “Plus” sign in a tariff plan you can ask for support in one of these sections or use any of our contacts.