Здравствуйте. Необходимо установить скидку в n%, при соблюдении условий служба доставки = 3, платежная система = 4. Если я в соответствующем правиле прописывваю условие на службу доставки, все работает отлично, но если добавляю дополнительное условие платежная система https://i.imgur.com/ueGSHGU.png , правило перестает работать. Также не работает рассчет скидки просто для одной платежной системы.
$siteId = \Bitrix\Main\Context::getCurrent()->getSite();$currency = \Bitrix\Currency\CurrencyManager::getBaseCurrency();
$userId = \Bitrix\Sale\Fuser::getId();
$basket = \Bitrix\Sale\Basket::loadItemsForFUser($userId, $siteId);
$order = \Bitrix\Sale\Order::create($siteId, $userId);
$order->setPersonTypeId(1); // Устанавливаем тип покупателя - Физические лица (ID=1)
$order->setBasket($basket);
// устанавливаю доставку, самовывоз
$shipmentCollection = $order->getShipmentCollection();
$shipment = $shipmentCollection->createItem(
\Bitrix\Sale\Delivery\Services\Manager::getObjectById(3)
);
// устанавливаю оплату, наличными
$paymentCollection = $order->getPaymentCollection();
$payment = $paymentCollection->createItem(
\Bitrix\Sale\PaySystem\Manager::getObjectById(4)
);
$propertyCollection = $order->getPropertyCollection();
echo '<pre>';
print_r($order->getPrice());
echo '</pre>';
$siteId = \Bitrix\Main\Context::getCurrent()->getSite();$currency = \Bitrix\Currency\CurrencyManager::getBaseCurrency();
$userId = \Bitrix\Sale\Fuser::getId();
$basket = \Bitrix\Sale\Basket::loadItemsForFUser($userId, $siteId);
$order = \Bitrix\Sale\Order::create($siteId, $userId);
$order->setPersonTypeId(1); // Устанавливаем тип покупателя - Физические лица (ID=1)
$order->setBasket($basket);
// устанавливаю доставку, самовывоз
$shipmentCollection = $order->getShipmentCollection();
$shipment = $shipmentCollection->createItem(
\Bitrix\Sale\Delivery\Services\Manager::getObjectById(3)
);
// устанавливаю оплату, наличными
$paymentCollection = $order->getPaymentCollection();
$payment = $paymentCollection->createItem(
\Bitrix\Sale\PaySystem\Manager::getObjectById(4)
);
$propertyCollection = $order->getPropertyCollection();
echo '<pre>';
print_r($order->getPrice());
echo '</pre>';