A
A
Arthur2019-12-25 17:48:04
1C-Bitrix
Arthur, 2019-12-25 17:48:04

How to display the "rule for working with the cart" in the detailed product card?

Task: display in the block information about products for which the "Cart rule" will work.
Problem: I can't find a method that will display discounts that work on the product in which we are in order to get the id of the products participating in this discount.
When entering a product, it shows a window, which means that it somehow receives this data, but it is not in the array of the product card
5e03752c87eaa809186056.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2019-12-25
@anton99zel

The discount is shown because the rule is passed, but the rules themselves do not contain data about the goods.
https://dev.1c-bitrix.ru/api_help/sale/classes/csa...
If you need to somehow group products at a discount, then group through properties.
In addition, cart rules can work without specifying product IDs. For example, through properties.
You can torment this method (highly not recommended)
https://dev.1c-bitrix.ru/api_help/catalog/classes/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question