PHPackages                             experius/module-donationproduct - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. experius/module-donationproduct

ActiveMagento2-module

experius/module-donationproduct
===============================

1.2.2(7y ago)2322.1k↓40%16[2 issues](https://github.com/experius/Magento-2-Module-Experius-DonationProduct/issues)[2 PRs](https://github.com/experius/Magento-2-Module-Experius-DonationProduct/pulls)proprietaryPHP

Since Nov 25Pushed 2y ago6 watchersCompare

[ Source](https://github.com/experius/Magento-2-Module-Experius-DonationProduct)[ Packagist](https://packagist.org/packages/experius/module-donationproduct)[ RSS](/packages/experius-module-donationproduct/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (16)Used By (0)

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/logo.png "Product Page")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/logo.png)

Magento 2 Module Experius DonationProduct (RC1.0)
=================================================

[](#magento-2-module-experius-donationproduct-rc10)

- Demo website:
- Magento Marketplace:

Installation
------------

[](#installation)

Add the module to your composer.json `composer require experius/module-donationproduct "~1.0.0"`

Run the Magento Setup Upgrade `bin/magento setup:upgrade`

Install Sample Data (optional)

A number of international charities will be created for testing purposes

(Oxfam, Greenpeace, Save the Children, Amnesty International, World Wildlife Fund)

`bin/magento experius_donationproduct:sampledata:deploy`

Remove Sample Data (optional)

`bin/magento experius_donationproduct:sampledata:remove`

Frontend
--------

[](#frontend)

- This module adds a new product type "Donation Product" to your Magento 2 installation.
- A customer can add this donation product to the cart with a self chosen amount.

The donation products can be viewed on several standard locations in your Magento 2 webshop

- Homepage
- Sidebar
- Cart
- Checkout

Off course it is possible to implement this block on any location by a Magento frontend developer. Or in a cms of category layout update via the Magento Admin. Xml example is provided in the 'Full Size Block' chapter.

When clicked on a charity of the customers choice a popup will open with the charities details and a add to cart button.

You can also create a regular category with all the donation products with a regular product detail page.

A "Donation Product" has a lot in common with a "Virtual Product". It has no stock, weight and doesn't need a shipping method or address to be set in the checkout.

#### Donation Popup

[](#donation-popup)

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/donation-modal.png "Product Page")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/donation-modal.png)

#### Product Page

[](#product-page)

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/product-page.png "Product Page")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/product-page.png)

#### Category Page

[](#category-page)

To view the donation products in a category (just like the screenshot below). Create a category in the Magento Admin and add the donation products to that category.

- Categories can be added in Magento Admin &gt; Catalog &gt; Categories
- After the category is made add the products to the Category via the 'Products in Category' tab.

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/category-view.png "Product Page")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/category-view.png)

#### Sidebar Block

[](#sidebar-block)

This block wil be visible on every page wich has a layout with a sidebar implemented. It can be disabled in the settings. See settings chapter.

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/donation-sidebar.png "Product Page")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/donation-sidebar.png)

#### Full Size Block (Homepage)

[](#full-size-block-homepage)

The full size block is visible on the homepage. It can be disabled in the settings. See settings chapter.

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/donation-full-size.png "Product Page")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/donation-full-size.png)

- A frontend Magento developer can implement this in custom position in you template by using the following xml.
- You can also use the xml below to add the block to a cms page. For example your 404 page. Edit the cms page and add the xml to the 'Design' tab &gt; 'Layout Update XML' field.

```

```

#### Checkout Block

[](#checkout-block)

The checkout donation block is visible in the checkout totals block. It can be disabled in the settings. See settings chapter.

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/donation-checkout.png "Checkout Donation")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/donation-checkout.png)

#### Cart Page

[](#cart-page)

The cart page donation block is visible on the cart page. It can be disabled in the settings. See settings chapter.

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/cart.png "Cart Page")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/cart.png)

Backend
-------

[](#backend)

#### Product Type

[](#product-type)

Add a new product with type 'Donation Product'

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/product-type-donation.png "Product Type")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/product-type-donation.png)

#### Edit Product

[](#edit-product)

You can configure the minimum donation amount.

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/product-setting.png "Product Setting")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/product-setting.png)

#### Report

[](#report)

Reports &gt; Sales &gt; Donations

A report table is made to store every single "Donation Product" sale. You can make an export, sum up the amount per charity and transfer the money.

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/report.png "Report")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/report.png)

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/report-grid.png "Report Grid")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/report-grid.png)

#### Settings

[](#settings)

Stores &gt; Settings &gt; Configuration &gt; Catalog &gt; Donation Product

There is a setting to enable or disable the complete module. There are settings to enable and disable the visibility of blocks on several locations in your webshop.

 [![](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/settings.png "Settings")](https://raw.githubusercontent.com/experius/Magento-2-Module-Experius-DonationProduct/master/Docs/Screenshots/settings.png)

#### Uninstall

[](#uninstall)

Follow the step below to uninstall the module.

1. Login in to Magento
2. Go to Catalog &gt; Products. Filter on product type 'Donation Product'
3. Delete all the Products with the type 'Donation Product'
4. Go to System &gt; Attributes &gt; Product
5. Search the attribute 'experius\_donation\_min\_amount' (Minimal Donation Amount) and delete it
6. Run the following in the command line `bin/magento module:uninstall Experius_DonationProduct`

#### FAQ

[](#faq)

***Can i combine the 'Donation product options' with 'Custom options / Customizable Options'?***

Although its not supported, it can be done! You have change the following template by overwriting it with your own custom template version. vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml. You probaly have to hide or remove a duplicate addtocart button

The donation product uses the 'product\_info\_form\_content' container. This is only rendered when no 'Custom options' are found.

```
