Configuring Order Gifts in 1C-Bitrix
A gift with order in Bitrix is a product at zero price, automatically added to the basket when marketing rule conditions are met. Implemented through the sale module, discount mechanics and marketing rules.
How it works technically
Gift is a marketing rule action with AddGift type. When conditions are met, the system adds the specified product to the basket with price 0. The product physically exists in the catalog — it's a regular catalog infoblock element with regular inventory.
Data is stored in b_sale_discount (the rule itself), b_sale_discount_action (action type = gift, gift product ID). In the basket, the gift enters b_sale_basket with PRODUCT_PRICE_ID = 0 and gift indicator.
Setting up marketing rule with gift
Store → Marketing → Discounts and promotions → Add:
-
Condition: for example,
Order amount >= 3000 rubles -
Action: select
Add gifttype - Gift product selection: specify specific catalog element
- Quantity: how many units of gift to add
- Settings: specify priority, promotion period
Inventory nuances
Gift product must have inventory. If inventory is zero, gift won't be added to basket. For promotions with limited gift quantity:
- Create separate product with limited inventory
- Configure manager notification when inventory drops to minimum
- Or use
OnSaleBasketItemAddevent handler to control distribution limit
Customer gift selection
Standard mechanism adds specific product automatically. If customer needs to choose from several gifts — this is custom development: gift selection component in basket, handler adding selected product and marking it as gift via b_sale_basket.CUSTOM_PRICE = Y and zero price.
Display in basket and order
In standard cart templates, gift displays at price 0 with "Gift" marking. In custom components, you need to check gift indicator and format markup accordingly so customer understands it's a bonus product, not system error.
Estimated timeframes
Setting up promotion with gift when order from amount X — 3–5 hours, including creating gift product in catalog and verifying display in basket.







