Übercart can read in many products at once through the use of the Importer module. It uses an XML file that describes all of the components of each product and tries to find link between the described data and the data already in the system.
Because the products in the XML file will have references to other data structures, these references need to be defined in the XML. Übercart assumes that any ids in the XML are based on whatever system the imported products come from. It attempts to find a match for these data objects in its database, usually based on the name. For example, if you want to import a product into an existing category, a <category> element corresponding to that term should be found in the import file. Übercart will map the <id> tag to the Drupal tid, and translate it whenever it sees that category <id> again.
XML Schema Description:
| XPath | Type | Required/Occurrences | Description |
|---|---|---|---|
| /store | Container | Yes, 1 | Root element of the XML file. |
| /store/vocabularies | Container | No, 1 | Holds the <vocabulary> elements. |
| /store/vocabularies/vocabulary | Container | Yes, unbounded | The container for the vocabulary object's data. |
| /store/vocabularies/vocabulary/id | Integer | Yes, 1 | The vocabulary ID in the original system. Will be mapped to a Drupal vid and referenced later. |
| /store/vocabularies/vocabulary/name | String | Yes, 1 | The name of the vocabulary. |
| /store/vocabularies/vocabulary/description | String | No, 1 | The vocabulary description. |
| /store/vocabularies/vocabulary/relations | Boolean | No, 1 | Whether the vocabulary allows related terms. |
| /store/vocabularies/vocabulary/hierarchy | Enum | No, 1 | The type of hierarchy: 0 -- None, 1 -- Single, 2 -- Multiple. |
| /store/vocabularies/vocabulary/multiple | Boolean | No, 1 | Whether nodes can be in multiple terms in this vocabulary. |
| /store/vocabularies/vocabulary/required | Boolean | No, 1 | Whether nodes must have a term in this vocabulary. |
| /store/vocabularies/vocabulary/tags | Boolean | No, 1 | Enables "free-tagging" for this vocabulary. |
| /store/vocabularies/vocabulary/weight | Integer | No, 1 | The relative position of this vocabulary or its terms in lists. |
| /store/vocabularies/vocabulary/nodes | String | No, unbounded | A node type that may be categorized with this vocabulary. |
| /store/categories | Container | No, 1 | Holds the <category> elements. |
| /store/categories/category | Container | No, unbounded | The container for the category object's data. |
| /store/categories/category/id | Integer | Yes, 1 | The category ID in the original system. Will be mapped to a Drupal tid and referenced later. |
| /store/categories/category/vid | Integer | Yes, 1 | The vocabulary ID of this category, referencing one of the previous <vocabulary> elements. |
| /store/categories/category/name | String | Yes, 1 | The name of the category. |
| /store/categories/category/description | String | No, 1 | Category description. |
| /store/categories/category/parent | Integer | No, unbounded | Each occurrence is the ID of the parent category of this category. Refers to the original system's ID. If not present, the category is at the top level. |
| /store/manufacturers | Container | No, 1 | Holds the <manufacturer> elements. |
| /store/manufacturers/manufacturer | Container | No, unbounded | Container for the manufacturer object's data. |
| /store/manufacturers/manufacturer/id | Integer | Yes, 1 | The manufacturer ID in the original system. Will be mapped to a Drupal tid and referenced later. Should reference one of the previous <category> elements. |
| /store/manufacturers/manufacturer/name | String | Yes, 1 | The name of the manufacturer. |
| /store/manufacturers/manufacturer/description | String | No, 1 | Manufacturer description. |
| /store/manufacturers/manufacturer/url | String | No, 1 | URL of the manufacturer's website. |
| /store/manufacturers/manufacturer/phone_no | String | No, 1 | Manufacturer's phone number. |
| /store/manufacturers/manufacturer/fax_no | String | No, 1 | Manufacturer's fax number. |
| /store/attributes | Container | No, 1 | Holds the <attribute> elements. |
| /store/attributes/attribute | Container | No, unbounded | Container for the attribute object's data. |
| /store/attributes/attribute/id | Integer | Yes, 1 | The attribute ID in the original system. Will be mapped to an Übercart aid and referenced later. |
| /store/attributes/attribute/name | String | Yes, 1 | The name of the attribute. |
| /store/attributes/attribute/ordering | Integer | No, 1 | The relative position of this attribute in lists. |
| /store/attributes/attribute/options | Container | No, 1 | Holds the attributes <option> elements. |
| /store/attributes/attribute/options/option | Container | Yes, unbounded | Container for the option object's data. |
| /store/attributes/attribute/options/option/id | Integer | Yes, 1 | The option ID in the original system. Will be mapped to an Übercart oid and referenced later. |
| /store/attributes/attribute/options/option/name | String | Yes, 1 | The name of the option. |
| /store/classes | Container | No, 1 | Holds the <class> elements. |
| /store/classes/class | Container | No, unbounded | The container for the class object's data. |
| /store/classes/class/id | String | Yes, 1 | The Drupal node type keyed to this class. |
| /store/classes/class/name | String | Yes, 1 | The name of the class. |
| /store/classes/class/description | String | No, 1 | Class description. |
| /store/products | Container | No, 1 | Holds the <product> elements. |
| /store/products/product | Container | No, unbounded | Container for the product object's data. |
| /store/products/product/unique_hash | String | No, 1 | md5 hash of the product data. Must be 32 characters long. |
| /store/products/product/id | Integer | Yes, 1 | The product ID in the original system. Will be mapped to a Drupal nid and referenced later. |
| /store/products/product/type | String | Yes, 1 | Drupal node type of product. Must be in <classes> element or {node_types} table. |
| /store/products/product/name | String | Yes, 1 | The name of the product. |
| /store/products/product/description | String | No, 1 | Product description. |
| /store/products/product/model | String | Yes, 1 | Model number or SKU. |
| /store/products/product/manufacturer | String | No, 1 | The name of the manufacturer. Correlates to the free-tagging form on the product edit page. |
| /store/products/product/list_price | Decimal | No, 1 | The manufacturer's list price of the model. |
| /store/products/product/cost | Decimal | No, 1 | The cost of the product. |
| /store/products/product/sell_price | Decimal | Yes, 1 | The sell price of the product. |
| /store/products/product/weight | Decimal | No, 1 | The weight of the product. |
| /store/products/product/weight_units | String | No, 1 | The machine-readable units of weight. Currently valid values are "lb", "kg", "g", and "oz". |
| /store/products/product/length | Decimal | No, 1 | The length of the product. All three of length, width, and height must be present to be saved. |
| /store/products/product/width | Decimal | No, 1 | The width of the product. All three of length, width, and height must be present to be saved. |
| /store/products/product/height | Decimal | No, 1 | The height of the product. All three of length, width, and height must be present to be saved. |
| /store/products/product/length_units | String | No, 1 | The units of length, width, and height. Currently valid values are "in" and "cm". |
| /store/products/product/pkg_qty | Integer | No, 1 | The number of products that will fit in one package. |
| /store/products/product/default_qty | Integer | No, 1 | The default value of the quantity field in the product's add to cart form. |
| /store/products/product/shippable | Boolean | No, 1 | If set, this product is shippable. |
| /store/products/product/image | Container | No, unbounded | Image information for field_image_cache. |
| /store/products/product/image/path | String | Yes, 1 | The absolute path to the source image. Übercart downloads it from this location to /files/ubercart_images where /files is Drupal's filesystem directory. |
| /store/products/product/image/alt | String | No, 1 | Alternate text for the image. |
| /store/products/product/image/title | String | No, 1 | Title text for the image. |
| /store/products/product/fields | Container | No, 1 | Holds the data of the CCK fields for <type> nodes. |
| /store/products/product/fields/field | Container | No, unbounded | Container for the field data. |
| /store/products/product/fields/field/name | String | Yes, 1 | The machine-readable name of the CCK field. |
| /store/products/product/fields/field/delta | Container | Yes, unbounded | Contains the values of the field. Fields with multiple values will have more than one <delta>. |
| /store/products/product/fields/field/delta/* | Any | Yes, unbounded | The tag name of each element contained in <delta> corresponds to a column in the appropriate content_field table. The most common tag will be a single <value> element containing the value of the field. |
| /store/products/product/categories | Container | No, 1 | Holds the <category> elements. |
| /store/products/product/categories/category | Container | No, unbounded | The container for the product's categories. |
| /store/products/product/categories/category/id | Integer | Yes, 1 | The category ID in the original system. I told you it'd be referenced later. |
| /store/products/product/attributes | Container | No, 1 | Holds the <attribute> elements. |
| /store/attributes/attribute | Container | No, unbounded | Container for the product's attribute object's data. |
| /store/products/product/attributes/attribute/id | Integer | Yes, 1 | The attribute ID in the original system. May reference an attribute <id> given earlier. |
| /store/products/product/attributes/attribute/name | String | Yes, 1 | The name of the attribute. Used if the <id> can not be mapped to an existing attribute. |
| /store/products/products/attributes/attribute/default_option | Integer | No, 1 | The default option <id> for the attribute. |
| /store/products/product/attributes/attribute/options | Container | No, 1 | Holds the product's attribute's <option> elements. |
| /store/products/product/attributes/attribute/options/option | Container | Yes, unbounded | Container for the option object's data. |
| /store/products/product/attributes/attribute/options/option/id | Integer | Yes, 1 | The option ID in the original system. May reference an earlier option <id> |
| /store/products/product/attributes/attribute/options/option/name | String | Yes, 1 | The name of the option. Used only if the <id> can not be mapped to an existing attribute option. |
| /store/products/product/attributes/attribute/options/option/price | Decimal | No, 1 | The price adjustment of the option. |
| /store/products/product/attributes/attribute/options/option/weight | Decimal | No, 1 | The weight adjustment of the option. |
| /store/products/product/adjustments | Container | No, 1 | Container for the adjustments to the product's model number caused by the customer's choice of attribute options. |
| /store/products/product/adjustments/adjustment | Container | Yes, unbounded | Container for the individual adjustment. |
| /store/products/product/adjustments/adjustment/combination | String | Yes, 1 | A serialized array with attribute ids for keys and the chosen option ids for values. |
| /store/products/product/adjustments/adjustment/model | String | Yes, 1 | The model number that appears on the invoice that reflects the chosen combination of attribute options. |
Note: Elements marked as required are only required if the parent element is present.
Note: All elements should be in the order given.
Order importing yet to come.


