1b.app
Link copied -

Refinement of the selection of categories for importing goods from the supplier Brain

It is necessary to make it possible to choose a category of any level, not only the main
- as far as I understand, now you can filter only categories with the parent=1 parameter - you need to get the whole list so as not to download everything, but only laptops (for example), because there are a lot of goods in parent categories that do not need to be downloaded and, in principle, processed, which will reduce the time of the import.
Original question is available on version: ru

Answers:

Not really a good idea due to the specific architecture of Brain...
For Brein, for example, the category Batteries can be in 3 different categories and it’s not a fact that the category you choose will be with them or that the same item will not be loaded 3 times for 1 import
There you can catch something like this: you load laptops, they have headphones in them, they belong to the accessories subcategory on their website, but they will fall into the box without a category. a category comes from Brein - headphones from the Audio section, which is not loaded according to the settings
IDs of the categories of the same name of the categories of the brain are all different.
How can I do that, but I can not give guarantees that it will work adequately
19.11.2021, 15:54
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
You are probably talking about looping through all the products and seeing if the category fits, which is not exactly what I'm suggesting.
If you write the category id http://api.brain.com.ua/products/1191/ in the request, then it returns only the products that are there
+ you can add id in brackets to the category name to understand what I choose
And if several categories are selected for import, then for each category form a separate request http://api.brain.com.ua/products/category_id/
19.11.2021, 16:03
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
And I will put down one category for everyone (I already evaluated it) or fill it without a category
19.11.2021, 16:04
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Just now, even if you select a category, the action works for half a day and the relevance of the downloaded data is questioned + flooded, for example, 25k for the same laptops, although there are 1-2k laptops themselves and they can be downloaded much faster
19.11.2021, 16:07
Original comment available on version: ru

I can refactor so that the categories from Brain are all + checks for imports of only the main categories - this will take about 3 hours.
Get what you choose - then it will import (if it finds a category - into it, otherwise - without a category).
22.11.2021, 16:05
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
I didn't quite understand what you're suggesting, I want only certain categories of products to be loaded, I suspect it's not exactly what you wrote.
It turns out that it will still shovel all the products, and it will check the category in them and load its products?
22.11.2021, 16:14
Original comment available on version: ru


I didn't quite understand what you're suggesting, I want only certain categories of products to be loaded, I suspect it's not exactly what you wrote.
It turns out that it will still shovel all the products, and it will check the category in them and load its products?

No. Now it loads the main categories - and there will be only those that you choose from the entire list (instead of just the main list).
That is, if you select some main and another child, it will import all products on the main and all on the child.
22.11.2021, 16:26
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license

Tyndyk Maxim Vadimovich
OneBox production wrote:
That is, if you select some main and another child, it will import all products on the main and all on the child.

That is, it will be possible to select any category, but there will also be a checkmark that you need to upload only by the main category, as before? If yes, then it is suitable, will this reduce the time of the action?
22.11.2021, 16:31
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
and as for the category ID, you need to see
22.11.2021, 16:33
Original comment available on version: ru


That is, it will be possible to select any category, but there will also be a checkmark that you need to upload only by the main category, as before? If yes, then it is suitable, will this reduce the time of the action?

What is the main category?
All categories with Brain will be on the list - which one you choose - this one will be loaded (whether it's the main one or not).

and as for the category ID, you need to see

can be added to selector output
22.11.2021, 16:54
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
okay thanks.
as we decide, I will write
22.11.2021, 16:55
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment