Configuring the loading of goods from the price list in XML format
If the counterparty provides a price list in YML format from Yandex Market, then columns can be automatically defined for this file format. Categories, products, prices, descriptions, attributes and photos will be loaded from the file.
Manual configuration of loading data from XML
There are cases when the XML file is not in the Yandex Market YML format or manual configuration is required in order, for example, to load data from the desired tag into the desired program column. This can be an attribute of the product that needs to be loaded, for example, in the "Manufacturer's Article" field.
To do this, you need to turn on the manual mode for setting up the XML file, reopen the window to update the view, and then go to "Column Addresses" to start manual settings.
To upload photos and product attributes, you must specify the product ID from the price list in order to establish a link. To do this, add 2 fields:
- "Product code (string UUID)" and specify the name of the [id] tag
- "Category ID (UUID string)" and specify the name of the categoryId tag
Then add tags to column addresses
To load data from attributes (properties, parameters, characteristics) from a file into the field you need, you must use the following syntax:
param[@name='XXX'], where XXX is the name of the attribute from the file in the specified tag
< param name='Название' > значение
<
param>
< param name='Название' > значение
<
param>
YML format tags are used to upload photos and attributes. For attributes, this is param, for a photo, picture, you don’t need to write them anywhere, but if there are other names in the price list, you will need to enter them here
After setting up all the required fields for uploading, you need to click the "Upload data" button.
As you can see, category data, photos, descriptions have loaded.
Information about the attributes was loaded into the appropriate section and the article that we took from the attribute ended up in the standard field "Manufacturer's SKU"
Setting up getting values from nested tags
For example, in the XML price list from the OCS provider, there is such a tag nesting structure, the task is to get the value from the Location tag
To do this, you must specify in the address
//Locations/QuantityLocation/Location
Attention! If the XML file specifies a namespace (namespace)
Then you need to use this kind (add x:)
//x:Locations/x:QuantityLocation/x:Location
XML view without namespace
How to get a value from a list of tags of a specific value
For example, you want to get the quantity of products only in the Kiev warehouse, the supplier provides data on the quantity of products in different warehouses in this form
To do this, you must specify in the address
//x:Locations/x:QuantityLocation[x:Location="Kiev"]/x:Quantity
How to get the entire value of a specific tag
For example, you want to get a list of all sizes
To do this, you must specify in the address
//product_sizes/size
after loading products from the price list, all values listed separated by a comma will be saved in the specified field.
If you want to get the value in order
//product_sizes/size[1]
result: S
//product_sizes/size[2]
result: M
How to get parameter value
The code parameter to get the red value use this expression
//product_colors/color/@code
How to get the value of one parameter based on the name of another
Example, you want to get the currency code for the string in which name is equal to price_supervip
//param[@name="price_supervip"]/@unit