The First Order Rule module is a custom Magento 2 module that introduces a new cart price rule condition. This condition allows merchants to create rules based on whether a customer is placing their first order.
Customer First Order Condition: Adds a condition to cart price rules to check if the customer is placing their first order.
Observer: An observer checks if the module is enabled and adds the custom rule condition to the existing cart price rules.
-
Clone this repository into the app/code directory of your Magento 2 installation:
git clone https://github.com/tomk1v/first-order-rule-module.git
-
Run the following commands from the Magento root directory:
bin/magento module:enable Intership_FirstOrderRule
bin/magento setup:upgrade
bin/magento setup:di:compile
-
Flush the cache:
bin/magento cache:flush
Navigate to Stores -> Configuration -> Internship -> First Order Rule and turn on the module:
Go to Marketing -> Promotions -> Cart Price Rules, and look for the First Order Rule under the list of available rules.
This module is designed to work seamlessly with:
Magento 2.4.6
PHP 8.2
©tomk1v