D
D
Darkhan Kamaliev2019-08-01 08:43:31
1C-Bitrix
Darkhan Kamaliev, 2019-08-01 08:43:31

How can I get pictures of product characteristics in 1s Bitrix?

In general, there is a store for 1s Bitrix.
The product has its own main picture and pictures for each of the characteristics.
The task is to get all pictures of characteristics for goods for an external service with a sql query.
Where are these pictures located in the database? What are their connections?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vyacheslav Shevchenko, 2019-08-02
@darakanoit

The fact is that in 1C-Bitrix there is no concept of "characteristic". There are properties and trade offers. As I understand it, by "characteristics" you mean trade offers, i.e. this is a variation of a product according to some property, for example, in clothing, a variation in size or color.
In Bitrix, pictures are not stored in the database; only information about the file is stored in the database and that's it. When you get a list of goods in the code, then in the fields with a picture you get the ID of the picture in the database. To get complete information about the picture, you need to do the following:
In response, you will receive an array with all the necessary information about the file, including the path to it relative to the site root.
Those. In order to upload pictures for trade offers to an external service, you need to:
1. Get a list of goods
2. Get a list of trade offers for this product.
3. Get a picture for a product,
4. Get a picture for a sales offer.
In Bitrix, goods are elements of the infoblock, and to get them you need to use this
. And then you already get the pictures, form everything received in the desired form and send it to your external service.

J
Jupiter Max, 2019-08-01
@vardoLP

well, you will output an array in the template and see what is there and how it is called.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question