G
G
Gennady Knyazkin2016-02-04 18:04:36
PHP
Gennady Knyazkin, 2016-02-04 18:04:36

How to apply a discount to selected products in Bitrix via api?

There is a discount in the database, how can I programmatically apply it to the necessary products in the cart? standard conditions do not fit

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Neverov, 2016-02-04
@deMone

Link a coupon to the discount and call CCatalogDiscountCoupon::SetCoupon:
dev.1c-bitrix.ru/api_help/catalog/classes/ccatalog...

E
Eldar, 2016-02-21
@eldario

You can dynamically create a coupon and apply it when the required conditions are met. This will allow you not to change the logic of working with discounts.
Agency website if anyone needs help edvancemedia.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question