📊 State of Magento 2025

The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

613 Modules
401 Ready
211 Need Help
🏆 Leaderboard
Potentially Abandoned v1.3.2

Freeproduct

code4business/freeproduct2

Configures cart price rules to automatically add free products to the cart as gifts. Supports simple and virtual product types, defining the gift by SKU and quantity.

163,787
Downloads
Below average
64
GitHub Stars
Above average
3y ago
Last Release
5
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
1 error , 135 warnings
PHPStan Failed

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.3.2 on Magento 2.4.8-p3
Dec 31, 2025

Share This Module's Status

Freeproduct Magento compatibility status badge

README

Loaded from GitHub

Freeproduct

An extension that allows configuring sales rules to add free products to cart. This is the Magento 2 version of the same extension that can be found here. The development and the function of the original Magento1 extension is described in the following two websites:

Requirements

  • PHP 7.4, 8.1
  • Magento >= 2.4.3-p1

Generally the last full release -1 version is tested and made to work. Older versions are not actively supported.

Supported Product Types

The extension only supports simple and virtual product types, other types or custom options are not supported. The reason is that other product types need additional information that can only be added with IDs. This leads to a way more complicated module; we want to keep this module clean and easy.

Instalation

Go to the Magento 2 root directory and run the following commands in the shell:

composer require code4business/freeproduct2
bin/magento module:enable C4B_FreeProduct
bin/magento setup:upgrade

Configuration

Sales rules for carts are configured in Marketing->Cart Price Rules:

  • In the Actions tab, the Apply field should be set to Add a Gift
  • Gift SKU: Product that will be added. Only simple and virtual products without (required) custom options are supported. Multiple comma-separated SKUs can be specified
  • Discount Amount: The qty of added gifts
  • The gift item is added once for the whole cart

Action Add a Gift (for each cart item) works similarly but will add the gift item for each product in cart. The qty of said product is also taken into consideration.

This action usually needs conditions to match only specific items (Apply the rule only to cart items matching the following conditions).

Limitations:

  • Gift products are added during discount total processing, after subtotal and shipping totals. Because of that gift products will not be included in any shipping calculations.
  • Only simple and virtual products without required custom options are supported.

Current localizations:

  • de_DE
  • es_ES
  • fr_FR
  • nl_NL
  • pt_PT
  • sl_SI

License

Open Software Licence 3.0 (OSL-3.0)

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.