N
N
Nazar Gorbunov2020-06-28 23:27:49
1C-Bitrix
Nazar Gorbunov, 2020-06-28 23:27:49

How to get the quantity of goods in the catalog in 1s Bitrix?

In the catalog.element template, you need to get the quantity of each product from the catalog. That is, I have now received the main sections of the catalog (example below), but I cannot count the number of products in each section. I have an ID, but the command below returns false, I checked the ID - such exist. I don't understand how to do it.

CCatalogProduct::GetByID

EXAMPLE:
1. Roses (got an ID, you need to calculate that the product is 2)
1.1 Red
1.2 White
2. Tulips (got an ID, you need to calculate that the product is 2)
2.1 Blue
2.2 Yellow

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jupiter Max, 2020-06-29
@Arly0

why do you need to get each product in catalog.element? Or do you mean that you need a menu from the catalog sections? Whereas the option is to use catalog.section.list

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question