string(2) "30"
Automaton for Self-Hosted Bitrix24
12.28.2017 13:08:00
Articles
30
The module allows to perform a mass loading of pictures into elements of infoblock.

This solution can be used in combination with the «Import from Excel» module. It expands the import capabilities when working with multiple elements loading — for example, to assign a detailed or preview picture to each product from the list.

Attention! For the correct installation of English version of the module, it is necessary that the language of the interface in the administrative part of the portal be set «English». The name is assigned to the infoblock at the moment of creation, it doesn’t react to further changes of language settings.

For the working of «Automaton» module, you have to specify one or more properties of infoblock, in which the links to pictures are stored.

For example, we create two properties by editing the user infoblock «AutoParts»:

en01.jpg

When adding properties, note that the variable must be a string type, because the link to the picture is a string. In the «Code» field, set the property code, which will be used later in the settings of actions with the infoblock (the field «From which property to take»).

The filled property of the infoblock in one of the elements will look this way:

en02.jpg

After the module has been installed, a new item will appear in the administrative part of the portal: DesktopContent mcart_servicesSettings of actions with the infoblock:

en03.jpg

In this section, you have to create the actions that will be performed for infoblocks. To add a new action, click Add Element:

en04.jpg

In the settings window, specify the beginning of the activity and the name of the action:

en05.jpg

Next, you have to specify the ID of the infoblock, for which the action will be performed.

You can see the infoblock ID in the list of infoblocks, for example:

en05-1.jpg

Or on the infoblock view page:

en06.jpg

In the following fields specify:

·         «To which property (field) to write» — specify character code. For example, for a preview picture PREVIEW_PICTURE, for a detailed picture — DETAIL_PICTURE.

·         «Actions» — select «Create a picture from URL».

·         «From which property (field) to take» — the property code of the infoblock, in which the link to the image is stored. For example, for a preview picture UF_PURL_PREVIEW, for a detailed picture — UF_PURL_DETAIL (codes that you set in the properties of the infoblock):

en07.jpg 

en08.jpg

·         «Number of records per one step of the agent» — how many records will be processed in one step of module’s agent. If you need to import a large amount of data, then it is desirable that it be processed gradually.

You can create multiple entries for actions with infoblocks — for example, separately for a detailed picture and separately for a preview picture.

en09.jpg

en10.jpg

Agent.

The frequency of the module can be controlled by the agent. To set the agent, go to Settings System SettingsAgents — select the agent mcart.iblockmanipulation. Click the settings button next to the agent name and select «Modify»:

en12.jpg

en13.jpg

Select the type of agent startup — at a specified interval or exactly at the specified time. If you select the first option, set the interval in seconds. If you select the second option, set the start date and time.

 en14.jpg

Attention! The module downloads pictures in a step-by-step manner, according to the settings you specified («Number of records per one step of the agent»). If you don’t have all the images loaded at once, then the module will load it in the next steps.

Installation.

1. Download the solution on the Marketplace, specify the path to install.

2. In the administrative part of Bitrix, click Install Updates. In the next window, under the license agreement, tick two boxes and click Apply.

3. Then click Install.

4. After installation, follow the instructions in the solution description.


comments powered by Disqus