Structure of light.xml file

Technical Specification
Language used in this document: English (en-US)

The light.xml file contains information about product prices in currency for target customer (also for sizes) and stock level of particular sizes.

Price of particular product is contained in <price> tag. Price is automatically calculated to currency requested by target customer – attribute @currency in <products> tag.

Each <product> has an unique @id (the same as in full.xml file) and @vat tag. Within <product> tag, a <price> tag with @net attribute is required. To specify different prices for particular <size>, enter a
<price> tag within <size>.

Suggested retail price (SRP) may be defined for each product in <srp> tag. That tag may contain information about gross price, net price. That tag is optional.

The strikethrough prices can be defined for each product and any size in the <strikethrough_retail_price> tag indicating a strikethrough retail price (STP) and in the <strikethrough_wholesale_price> tag indicating a strikethrough wholesale price (SWP). These tags are optional and may contain information about the gross price, net price.

Each size has following attributes: @id, @code, @code_producer, @weight.

Required attributes:

  • @id – size ID (the same ID used in full.xml file)
  • @code – unique product code, e.g. 1454-03

Optional attributes:

  • @text_id - size Name (the same Name used in full.xml file)
  • @code_producer – manufacturer code
  • @weight – weight of product in particular size

Information of price of particular size is an optional feature. Optional is also a product quantity. A <stock> tag contains information about @quantity of product (product in particular size). Remember, that stock @id should be specified.

Example stocks in IdoSell.com and their @id attributes:

  • M0 - id="0"
  • M1 - id="1"
  • M2 - id="2" etc.

@quantity attribute may contain a fractional value.

Notice:

-1 value in @quantity attribute is interpreted by IdoSell Shop (IAI-Shop.com) platform as an infinity value of stock level.

There are following relations between data:

  • product.sizes.size@id tag is related to sizes.group.size@id from sizes.xml,
  • product.sizes.size.stock@id is related to stocks.stock@id from stocks.xml,
  • product price is assembled from following fields:
    • offer.products.product.price@gross
    • offer.products.product.price@net

In case only @net price is specified, it shall be set as a retail price.
In both cases, product@vat is not required.

XML Example plik light (XML) file

<?xml version="1.0" encoding="UTF-8"?>
<offer file_format="IOF" version="3.0" generated="2018-04-12 12:00:00" >
<products currency="PLN">
    <product id="1" vat="23.0">
        <price gross="149.99" net="121.94"/>
        <srp gross="655.00" net="532.52"/>
        <strikethrough_price gross="824.00" net="669.92"/>
        <sizes>
            <size id="0"  code_producer="0009876551180" code="1-0" weight="1200">
                <price gross="149.99" net="121.94"/>
                <srp gross="655.00" net="532.52"/>
                <strikethrough_price gross="824.00" net="669.92"/>
                <stock id="0" quantity="-1"/>
                <stock id="1" quantity="100"/>
                <stock id="2" quantity="200"/>                
            </size>
        </sizes>
    </product>
    <product id="2" vat="23.0">
        <price gross="300.00" net="243.90"/>
        <srp gross="750" net="609.76"/>
        <strikethrough_price gross="450.00" net="365.85"/>
        <sizes>
            <size id="C" text_id="30/30" code_producer="0009876551180" code="2-C" weight="1100" >
                <price gross="300.00" net="243.90"/>
                <stock id="1" quantity="100"/>
            </size>
            <size id="D" text_id="30/32" code_producer="0009876551180" code="2-D" weight="1400" >
                <price gross="350.00" net="284.55"/>
                <stock id="1" quantity="100"/>
            </size>
            <size id="E" text_id="30/34" code_producer="0009876551180" code="2-E" weight="1700" >
                <price gross="400.00" net="325.20"/>
                <stock id="1" quantity="100"/>
            </size>
        </sizes>
    </product>
</products>
</offer>

XML Schema Validator: plik light (XSD) file