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.
General iT can install and configure this module and check how it works on your website.