Git Product home page Git Product logo

freeproduct2's Introduction

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.0.0
  • Magento >= 2.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.

Instalation

Via composer (recommended)

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

Manually

Create the directory app/code/C4B/FreeProduct and copy the all the files from this repository into it. Then run:

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
  • Discount Amount: The qty of added gifts

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)

freeproduct2's People

Contributors

domeglic avatar aurelienlavorel avatar laurent35240 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.