Importing products with an XML file is one of the fastest and easiest ways to import a large catalog of product content into your store. Often XML importing may be necessary if you are working with a partner/distributor who provides you with an XML structure directory. In this article, you will find information about what an XML structure is and how to use it to activate the application we have developed, to help you manage the product catalog in your online store.
What are an XML file and XML structure?
The idea of data correction is helpful for understanding XML. People have been creating documents for centuries and have been adding signs to them for just as long. Correcting a document is how we determine the structure, meaning, and appearance of information in a document. In the world of computers, "correction" has evolved into "markup." Marking is the process of using codes, called labels (or sometimes tags), to determine the structure, appearance, and, in the case of XML, the meaning of the data. Here is how a sample XML file it looks like, opened in a browser containing information about hundreds of products:
In the photo above, you see tags that contain each item of the product summary information. Each element of a product, such as an identification code, name, category, description, tags, brand, price, weight, quantity, photo, variety, and value, must be enclosed with an opening and closing tag in order for the information to be read correctly and to can be imported to your store using the XML Import application. The names of the tags themselves, which contain each element of the product, are defined by the creator of the XML file.
A well-crafted XML file meets a set of very strict rules that govern XML. If a file does not comply with these rules, XML stops working. For example, in the code sample above, each opening tag has a corresponding closing tag, so that the sample meets one of the rules for proper layout. If you remove a tag and try to open this file, you will see an error message and the program will prevent you from using the file.
You do not need to know the rules for creating well-formed XML (though they are easy to understand), but you should remember that you can only share XML data between programs and systems if the data is well-formed. If you cannot open an XML file, it is likely that the file is not well-formed.
When should I use the XML Import application?
* When you have provided online information (in a structure different than XML, that can be converted into XML) for a large number of products, that you want to sell in your online store
* When your partner or distributor provides you with information about the products you want to sell in the form of an XML file
If the product information you want to upload to your store has not been collected in one place and the products are not many, you do not need to use this importer. In this case, you can manually upload any product to your store, which is also done quite fast and easily in the Products section of your store's control panel.
From here you can see our sample CloudCart template.
The first step in task settings in the XML application
1. Go into your control panel > Apps > All Apps > XML products import.
2. After you log into the App, click on the button Create a job in the top right-hand corner and carry on with the settings:
* Job name - write down a name for the XML task against the criteria and the purpose for which you create it. The name will only be visible in the control panel, in the list of tasks in the import application
* XML URL - paste the full URL into the XML file here. If you have an XML file, first upload it in the Settings > Files section of your control panel to get a link to put in this field
* Import all products in the category - use the drop-down menu to select an existing product category into which all XML task products will be imported. If the XML file contains product category information, you don't need to use this drop-down menu, just skip it and continue to the next task settings
* Import all products to the vendor - use the drop-down menu to select an existing brand into which all XML task products will be imported. If the XML file contains product brand information, you do not need to use this drop-down menu, just skip it and continue to the next task settings
* Import all products as - from the drop-down menu, select whether the products should be imported as directly visible in your store or imported as unpublished. Once the entire task is completed and the products are imported, you can use the quick tools in the Products section to publish all the products at once
* XML Product tag - enter the tag in the XML structure here that contains all the other tags and information for each product. XML product tag in this structure
e <product> - in this case, in the first step of the task settings, you have to enter "product" for the product tag.
* Assign to the main XML job - If you have a basic XML task and the one you are currently creating must run on it, you can select the basic one from this drop-down menu. For example, if you have one XML product feed and a second XML feed with inventory, then the first XML (product one) will be based on the stock XML
* Rows - enter the maximum number of rows in the XML feed here for the system to check for a product tag. If the feed structure is correct, you should not need to change the number of lines and the product tag is sure to be included in the first 500 lines
* Track inventory - through this option the quantity of all products that will be imported will be monitored by the system. When an item is sold, the remaining quantity will be recalculated from the total set quantity of the product
* Disable missing products - disable products that are now missing from the XML feed, but were added earlier from the feed
* Continue selling - if you enable this option the system will allow ordering the product even if the quantity of the product is 0
* Task ID number - enter a task number. It will serve to distinguish or merge the tasks you have enabled in the application. Task ID allows you to create multiple import tasks that work in sync. To be able to work together and update product information, their task ID must be the same
* Choose Fixed Discount type - if the XML feed contains products with two prices (primary and reduced), here you must select a fixed discount existing one in the control panel to import these products to show their two prices in your store. If you do not already have such a discount in the control panel and there are two priced products in the XML feed, see how to create a fixed discount here
3. After checking the data entered in the first step, use the Save and Go to Step 2 button to specify how to import the XML feed data into your store's product catalog.
Step 2 in the task settings of the XML application
1. If the product tag introduced in the previous step is correct, the platform will now be able to read the contents of the XML feed. You have to configure which item of products would be imported in correlation to their existing tags in the XML feed.
First and foremost, choose which unique product number is in the XML feed. Take a look at the file you have available and consider which tag contains different numbers for each product in the XML feed.
2. All the boxes you see on the left are the items that could exist for a single product. The Title of the product is its name. If there is a tag in the XML file that you upload and contains the name of each product, you must choose from the drop-down menu next to Title what that tag is. For example, in an XML feed with this structure:
3. There are quite a lot of sections in Step 2 and depending on the information you have in the XML feed and the information you want to import in the store, continue linking the two columns carefully choosing which tags to fill in for the products in your catalog. Press Save and continue to Step 3 to complete the task settings.
Step 3 in the task settings in the XML application
In this step, you can create additional operations and rules for importing products from the XML file into your store directory. For example, if you want the contents of any of the tags to be supplemented or modified by certain values, you can set up all of these actions and change the product import as needed.
* This setting is commonly used if you have a value in the XML feed, and you wish to upload it as a higher one in the product catalog.
Then click save on Save Job in the top right-hand corner and the XML file would become active.
It is important to note that if you correctly specified the product tag in the first step of the XML upload, then in the next steps you will use the drop-down menus, through which the system will already successfully show you the information from the file and you just need to indicate what each tag from the XML feed should be used for.