V
V
Vladislav Ovechkin2017-03-14 13:15:18
CMS
Vladislav Ovechkin, 2017-03-14 13:15:18

How to quickly add trade offers to bitrix?

Tell me how you can quickly fill an online store with trade offers on cms bitrix ???
https://bellfi.ru/catalog/16mm_sirokko/karniz_shishka/ - an analogue of this.
From the options of goods, the price, description and characteristics change.
The difficulty is that the product has many options from which the price and characteristics change. Those. it's not 1-2 options like "Color" and "Size".
In my case, these are: (single-row double-row) (rings, clips, without rings) (sizes 160 180 200 240 300 360 400) In
total, about 42 trade offers for 1 product in which 42 prices, 42 descriptions and 42 characteristics need to be changed.
There are about 200 items in total.
Total roughly speaking 42 * 200 = 8400 goods.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
Grigory Vasilkov, 2017-03-14
@ironvlad

As one very sensible person wrote in today's (yes, see the date) article on Habré - All programmers end up in Tai. And because Bitrix is ​​AIDS, the discussion of this topic was omitted.
So... there is no easy way.
You do

$id = CIBlockElement:GetList(null,['code' => to_translit($name)]);
if ($res) CIBlockElement:Update($id, $fields);
else CIBlockElement:Add($fields);

CCatalogProduct:GetList()
...см выше

CPrice:GetList();
...см выше

And all this in foreach.
From the important CCatalogProduct uses as ID - the id of the infoblock element. Those. id received in the last three lines.
But CPrice uses the price ID, and you can't even update it without specifying $fields['product_id' => $id]
And yes, now you understand why Bitrix is ​​AIDS. Because to convince directors greedy for beauty that this horror is possible only with a quickly written js-injection, which is inserted by any manager into the news code, which allows you to carry away the password of absolutely any administrator.
Because the only thing bosses are afraid of is security vulnerabilities, they don't care. Well, that is - a written script like $($.ajax("/logout")), and if you think of it (which the author of the article did), then the password is grabbed, which people enter into their window and all this from the script, added by the manager through the admin panel if he decides to become a programmer.
Well, that is, they will not hear the words, at all.

R
Roman Gritsuk, 2017-03-14
@winer

Try using the offer generator

Y
Yaroslav Alexandrov, 2017-03-15
@alexyarik

Filling with goods by waving a magic wand is not carried out. This is work. In any management system, goods need to be filled, whether it is Bitrix or not. There are three ways, manual entry (as you were advised to use the generator above), manual import and automatic import from accounting systems, such as 1C.
I assume that 8400 goods are not stored in the customer's head. So there is some kind of accounting system, perhaps there is a list of goods. Therefore, I recommend that you prepare a product file for import in Excel and then upload all products to Bitrix. After that, you will generate goods with trade offers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question