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.

MODULE FOR 1C-BITRIX

ARAMA

Scoder: Arbitrary PHP condition for cart operation rules. Custom conditions in discounts

The Scoder module enables applying or disabling discounts in the shopping cart and checkout forms using arbitrary PHP conditions. Standard 1C-Bitrix tools allow limiting product participation in promotions by categories, properties, and other parameters, but their functionality is often insufficient for complex scenarios.

4.00/5 · 3 ratings

1C-Bitrix Marketplace: 4/5 · 3 ratings

Technical details

Published
18 November 2017
Updated
17 January 2024
Version
1.0.7
Installed
500–999 times
Responsive design
No
Composite support
No
Compatible with Sites24
No
Developer
ARAMA

What this solution does

The Scoder module enables applying or disabling discounts in the shopping cart and checkout forms using arbitrary PHP conditions. Standard 1C-Bitrix tools allow limiting product participation in promotions by categories, properties, and other parameters, but their functionality is often insufficient for complex scenarios. This module extends the system capabilities by allowing custom conditions to be defined via PHP code.

The Scoder module extends the list of cart rule conditions by adding support for arbitrary PHP expressions. The condition value must be a boolean expression returning true or false.

This tool is designed for developers and requires configuration for specific tasks. It is not a ready-made solution for a narrow set of scenarios, but it enables the implementation of complex, non-standard marketing logic when used correctly.

How it works:

1. A standard cart rule is created.

2. Standard conditions and restrictions are specified if needed.

3. An arbitrary PHP expression is entered in the additional conditions field. It is recommended to encapsulate the logic in a separate function for easier algorithm description and to minimize errors. The function must return true or false.

Example function implementation in init.php:

----------------------------------------------

----------------------------------------------

The Scoder module allows setting arbitrary PHP conditions for cart operation rules, including custom conditions within discounts. To configure this, specify the name of your function in the PHP condition field; the example uses the __sc_check() function. The tool effectively addresses a wide range of tasks related to cart logic.

The Scoder module enables the creation of arbitrary PHP conditions for shopping cart rules, providing flexible discount configuration. It supports complex scenarios that are not available with standard tools.

Key capabilities include:

Applying different discount amounts for a single coupon based on the total cart value, item quantity, or the presence of specific products and their properties.

Flexible coupon usage management: limiting the number of times a coupon can be used by a single user without restricting other customers from using the same promo code.

Applying discounts or markups based on the selected pickup point in the order form.

Automatically selecting the most or least beneficial discount for the cart.

Disabling all discounts if any coupon is present in the cart.

Configuring individual discounts for each specific customer.

Providing discounts on products after completing a survey.

Restricting the number or type of discounts applied in the cart.

Accounting for dates, holidays, and other time-based factors when calculating discounts.

Advantages of the module:

Unique capabilities for customizing discount logic.

Comprehensive informational support, including documentation and thematic articles.

Direct technical support from developers without intermediary managers.

For the “Scoder: Arbitrary PHP condition for cart operation rules. Custom conditions in discounts” module, General iT can perform installation, configuration and a functional check in your project.

UPDATE HISTORY

What’s new

7 releases
1.0.7 (17.01.2024)Latest update

Added support for PHP condition functionality for the Buy More module

1.0.6 (31.01.2023)

Adjustments for PHP 8

1.0.5 (29.12.2022)

Adjustments for PHP 8

1.0.4 (30.11.2020)

Adjustments for working with the 'Online Store + CRM' edition

1.0.3 (05.06.2020)

Warning elimination

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.
How much does this solution’s renewal cost?
The current renewal price is 2,950 ₽. 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