2017 © Pedro PelĆ”ez
 

magento2-module freeproduct2

Adds a sales rule action to add a product to cart. Can be used to create sales rules to add gifts to cart.

image

code4business/freeproduct2

Adds a sales rule action to add a product to cart. Can be used to create sales rules to add gifts to cart.

  • Tuesday, June 5, 2018
  • by code4business
  • Repository
  • 5 Watchers
  • 10 Stars
  • 580 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 5 Versions
  • 67 % Grown

The README.md

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: - http://www.code4business.de/make-a-gift-magento-warenkorbpreisregeln-um-geschenke-erweitern/ - http://www.webguys.de/magento/turchen-21-kostenlose-produkte-uber-warenkorb-preisregeln/, (*1)

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., (*2)

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., (*3)

Instalation

Go to the Magento 2 root directory and run the following commands in the shell:, (*4)

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, (*5)

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., (*6)

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

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), (*8)

The Versions

05/06 2018

dev-master

9999999-dev https://github.com/code4business/freeproduct2

Adds a sales rule action to add a product to cart. Can be used to create sales rules to add gifts to cart.

  Sources   Download

OSL-3.0

The Requires

  • magento/module-sales-rule >=100.0.0
  • php >=7.0

 

The Development Requires

by Dominik Meglič

magento2 gift sales rule

05/06 2018

1.0.3

1.0.3.0 https://github.com/code4business/freeproduct2

Adds a sales rule action to add a product to cart. Can be used to create sales rules to add gifts to cart.

  Sources   Download

OSL-3.0

The Requires

  • magento/module-sales-rule >=100.0.0
  • php >=7.0

 

The Development Requires

by Dominik Meglič

magento2 gift sales rule

13/04 2018

1.0.2

1.0.2.0 https://github.com/code4business/freeproduct2

Adds a sales rule action to add a product to cart. Can be used to create sales rules to add gifts to cart.

  Sources   Download

OSL-3.0

The Requires

  • magento/module-sales-rule >=100.0.0
  • php >=7.0

 

The Development Requires

by Dominik Meglič

magento2 gift sales rule

08/01 2018

1.0.1

1.0.1.0 https://github.com/code4business/freeproduct2

Adds a sales rule action to add a product to cart. Can be used to create sales rules to add gifts to cart.

  Sources   Download

OSL-3.0

The Requires

  • magento/module-sales-rule >=100.0.0
  • php >=7.0

 

The Development Requires

by Dominik Meglič

magento2 gift sales rule

07/11 2017

1.0.0

1.0.0.0

Adds a sales rule action to add a product to cart. Can be used to create sales rules to add gifts to cart.

  Sources   Download

OSL-3.0

The Requires

  • magento/module-sales-rule >=100.0.0
  • php >=7.0

 

The Development Requires

by Dominik Meglič