In order for your CommercePro publications to access your product data, it must first be uploaded to our system. This data is used to create product links and display dynamic product windows (DPW).
The data is specified as an XML file similar to this:
<products xmlns="http://schema.zmags.com/product_data_1.0"> <update> <product> <product_id>example1</product_id> <name>Example 1</name> <description>Example description</description> </product> <product> <product_id>example2</product_id> <name>Example 2</name> <description>Another example description</description> </product> </update> </products>
This shows two different products, each with a product_id, name and description.
View / download a blank template XML file.
View / download XML for an example store.
Sections of the XML File
The XML files used with Zmags require a few specific sections to function correctly:
- The <products> tag: These tags enclose the rest of the document, and contain a URL pointing to the document where all the pre-made tags are defined. Remember, this is not the same thing as the <product> tag used inside the <update> section.
<products xmlns="http://schema.zmags.com/product_data_1.0"> <!-- The rest of the file goes here. --> </products>
- The <delete> section: Products whose IDs are placed in this section will be deleted. Generally, it is a good idea to include all products which will be created in the <update> section so that you are starting fresh on subsequent uploads.
<delete cascade="true"> <product_id>0000</product_id> <product_id>0001</product_id> <product_id>0002</product_id> </delete>
If you would like to clear out all products on your Publicator account and start with a clean slate, simply use the following instead of a normal <delete> section:
Fields in the XML File
- The <product_id> tag: Each <product> must have a unique product ID, also known as its SKU number. Typically this is a string of letters and/or numbers, with some specific pattern consistent between items. This number is how you specify which product to use for a given product link and DPW. It could be as simple as 001, 002, 003, or something more complicated like C01S03P0028 (color 1, size 3, product number 28).
- The <name> tag: This is simply a string of text that will be shown as the title of the dynamic product window when opened.
<name>My Great Product: Deluxe Edition</name>
- The <description> tag: This is a string of text that will be shown in paragraph form when the dynamic product window is opened.
<description> The "My Great Product" is so great. You'll use it every day! It has a variety useful features and addons. </description>
- The <normal_image_url> and <zoom_image_url> tag: This should be a full URL path to the picture(s) you want to use with your dynamic product window. If you will not be using a dynamic product window which gives the ability to zoom in on your product images, these tags may use the same URL.
- The <price> tag: This should be a number with two decimal places. It appears in the dynamic product window, and is also used to calculate the total cost in the shopping basket.
Upload and Import
The product XML files can be uploaded and imported into our system in three different ways:
- The file can be manually uploaded via the Zmags Publicator. After logging in, click "Products" on the left side, and then "Upload Product File".
- The file can be uploaded via FTP:
Protocol: FTP - File Transfer Protocol
Encryption: Choose either "None" (normal transfer) or "Require explicit FTP over TLS" (secured transfer)
Logon Type: Normal
Username: (same as Zmags Publicator)
Password: (same as Zmags Publicator)
Place the file in the "Products" folder and it will automatically be picked up for processing.
- For advanced users, the file can be sent via POST as multi-part formdata to a webservice. Detailed documentation in regards to this approah may be found here:
XML Technical Specification
The "schema" file describes what can be contained in a type of XML file, and how it is used. This is the same document referenced by the <products> tag, as mentioned above. For advanced users, this document is human readable so that you can learn about the available tags for usage with Zmags Product XMLs: http://schema.zmags.com/product_data_1.0