Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.
PHP condition in cart rules for implementing custom discount and markup conditions

MODULE FOR 1C-BITRIX

Dmitry Krotov

PHP condition in cart rules for implementing custom discount and markup conditions

The module adds a new 'PHP Condition' to shopping cart rules for flexible management of discounts and markups. This enables implementing custom logic for applying discounts at the PHP function level, determining exactly which customers, orders, or products qualify. You can place arbitrary PHP code in the condition field.

Technical details

Published
12 May 2022
Updated
19 November 2026
Version
1.0.1
Installed
100–499 times
Responsive design
No
Composite support
No
Compatible with Sites24
No
Developer
Dmitry Krotov

What this solution does

The module adds a new 'PHP Condition' to shopping cart rules for flexible management of discounts and markups. This enables implementing custom logic for applying discounts at the PHP function level, determining exactly which customers, orders, or products qualify.

You can place arbitrary PHP code in the condition field. The execution result must be a boolean value: true (the discount or markup is applied) or false (application is denied). Note for developers: the code is executed via the eval() function within the standard discount handler of the sale module.

The most common use case involves passing a custom function. The variable $arOrder is automatically passed to it. If the calculation is for a specific product, the variable holds a temporary order for that item. If the calculation covers the entire cart, the variable contains the current order with the full list of products.

The 'PHP Condition' can be combined with other shopping cart rule parameters.

Examples of discount and markup scenarios implementable with this module:

The module allows setting arbitrary conditions for calculating discounts and markups in the shopping cart using PHP code. It supports implementing logic based on the traffic source or advertising campaign, setting different prices for various devices or geographic regions, and configuring progressive discount systems.

If “PHP condition in cart rules for implementing custom discount and markup conditions” fits the task, General iT can install the module, configure it and verify the result in the project.

UPDATE HISTORY

What’s new

1 releases
1.0.1 (19.11.2026)Latest update

Security Guide

USER EXPERIENCE

Solution reviews

How does this solution work in a real project? Share your experience and help others choose.

Be the first to share your experience

There are no reviews of this solution on git.ru yet. Tell us what worked well and what could be improved.

Verified purchaseAdd a key if you wish. A verified review gets a badge, priority placement and more rating weight.

Open to every clientJust sign in to your account. A key is optional; all reviews are moderated.

YOUR EXPERIENCE MATTERS

Your review

YOUR PROJECT INFRASTRUCTURE

A home for your website

BEFORE YOU ORDER

Let’s go through the details.

What does the price cover?
The displayed price covers the solution itself. Platform licensing, installation and customisation are checked separately. If the page offers bundles, select the required option before submitting a request.
How do I check compatibility?
Compare the supported editions and solution version in the technical details with your project. Before installing on a live website, we recommend making a backup and checking the solution in a test environment.
Is there a trial?
The developer lists a trial of 14 days. The trial button opens the installer in your website control panel. Check the required features and compatibility before purchasing.
How much does this solution’s renewal cost?
The current renewal price is 2,500 ₽. Before you order, a manager will confirm the renewal period and whether it applies to your licence.
Can you help with implementation?
We can help install the module, check its settings and verify how it works in your project. Compatibility with other customisations and the scope of work are assessed before we begin.

GENERAL iT

Let’s discuss your project

Получатель: ООО «Дженерал Ай Ти Рус»

1C-BITRIX

Install solution

Enter a domain with or without https://. The installer will open in your website control panel in a new tab.

Solution screenshots

Solution screenshot