P
P
Pavel Gogolinsky2015-10-05 05:56:56
1C-Bitrix
Pavel Gogolinsky, 2015-10-05 05:56:56

How to set the property type "binding to element" in xml-upload for 1C Bitrix?

I am compiling an xml upload template for a 1c programmer for a book catalog site. I specify properties.

<Свойство>
            <Ид>CODE</Ид>
            <Наименование>Артикул</Наименование>
            <ТипЗначений>Строка</ТипЗначений>
        </Свойство>
        <Свойство>
            <Ид>COVER</Ид>
            <Наименование>Переплёт</Наименование>
            <ТипЗначений>Справочник</ТипЗначений>
            <ТипыЗначений>
                <ТипЗначений>
                    <Тип>Справочник</Тип>
                    <Описание>Значения свойств объектов</Описание>
                    <ВариантыЗначений>
                        <ВариантЗначения>
                            <Ид>hard</Ид>
                            <Значение>Твердый</Значение>
                        </ВариантЗначения>
                        <ВариантЗначения>
                            <Ид>soft</Ид>
                            <Значение>Мягкий</Значение>
                        </ВариантЗначения>
                    </ВариантыЗначений>
                </ТипЗначений>
            </ТипыЗначений>
        </Свойство>

How to correctly set the property of the book "Author"? Its type is in the Bitrix Binding to the element (I store the authors in a separate infoblock). And how do you upload authors? In a separate download, or is it possible in the same one?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-10-05
@gogolinsky

At the beginning of the xml, all properties are declared. If you have Binding to an element to another infoblock, you will see something like this content:

<Свойство>
<Ид>246</Ид>
...
<БитриксСвязанныйИнфоблок>82b1bdcf-be01-49ca-bba8-b57a6050ed06</БитриксСвязанныйИнфоблок>
...
</Свойство>

<BitrixAssociated Infoblock> is a character code of the "Author" infoblock.
Well, already specifically for the element there is this:
<PropertyValues>
<ЗначенияСвойства>
<Ид>246</Ид>
            <Значение>35175</Значение>
            <ЗначениеСвойства>
              <Значение>35175</Значение>
              <Описание></Описание>
            </ЗначениеСвойства>
            <Значение>35173</Значение>
            <ЗначениеСвойства>
              <Значение>35173</Значение>
              <Описание></Описание>
            </ЗначениеСвойства>
            <Значение>35178</Значение>
            <ЗначениеСвойства>
              <Значение>35178</Значение>
              <Описание></Описание>
</ЗначениеСвойства>

Where Id is the infoblock property that refers to the infoblock with the authors.
Best of all - create all the necessary infoblocks. Fill in one element as it should be on the site for you. And export the data to xml of the main infoblock. You will receive such a code that is needed for a 1C programmer.
And good luck with setting up the exchange =)

D
Digital_Ace, 2017-01-25
@Digital_Ace

Thanks for the answer. What type of property should be set if it refers to another infoblock? For example, what type should the "Author" property be so that when unloading from 1C to CML, the site sets its value to the type "binding to the element"?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question