MERGADO 2 - Attributes

MERGADO 2 now allows you to work with attributes.

What is an attribute?
An attribute is part of an element, it usually works as a specification parameter and carries a specific value. They are usually written in the first element but can occur in any element.

In the feed they can look like this:

<SHOP>
  <SHOPITEM id="DEF87" import-code="fewfwf">
    <CODE>7DW890</CODE>
    <EXTERNAL_ID>ALERNARIVE798</EXTERNAL_ID>
    <NAME>Iron</NAME>

or

<IMAGES>
  <IMAGE description="desc image">www.iron-image.com</IMAGE>
</IMAGES>

In Mergado, we mark these elements with @. The notation in Element-Path is then as follows:

@id
@import-code

or

IMAGES | IMAGE | @description

The enhanced Elements page allows you to create and manage attributes. You can work with their values where element names appear: rules, MQL, etc.

The special attribute @@POSITION is used to specify the position of the element.
For example, I have multiple values of the element <IMGURL_ALTERNATIVE>

<IMGURL_ALTERNATIVE>http://url1.com/image.png</IMGURL_ALTERNATIVE>
<IMGURL_ALTERNATIVE>http://url1.com/image2.png</IMGURL_ALTERNATIVE>

The value http://url1.com/obrazek2.png is in the second position and the path to the element value (element-path) looks like:
IMGURL_ALTERNATIVE { @@POSITION = 2 }

Examples of use can be found in thread.

1 Like