MicroPayments Plugin (CMMP) - EDD (Easy Digital Downloads) - Discounts
One of the MicroPayments plugin options of using the points is changing them to the Easy Digital Downloads discounts.
The discounts are created by exchanging the selected (by user) amount of points to the discount having the fixed amount in the selected currency (not a percentage discount!) using the ratio set by the administrator. To enable this functionality the Easy Digital Downloads must be enabled and the feature has to be enabled in the Micropayment Settings page.
The option "Allow to convert MicropaymentPoints into discounts" is required for the functionality to work:
Below: The ratio used for generating the discounts is the same ratio which is used in the Easy Digital Downloads Gateway. You can find these settings in Downloads → Settings → Payment Gateways
There are two shortcodes - one to create the discounts, one to list the created discounts.
- [cm_micropayment_points_to_discount] - this is the shortcode for displaying the form allowing to change the points into discounts
- [cm_micropayment_points_discounts] - this is the shortcode allowing to display the table of all generated discounts (Note: it won't display anything if no discounts were generated!)
The form displayed by the [cm_micropayment_points_to_discount] shortcode contains:
- Field to input the Wallet ID - if the user is logged in, and the Wallets are assigned it will be pre-filled with the user's wallet ID
- Points to exchange - user needs to put the amount of points which they want to exchange for a discount
- Remaining points - it displays the remaining amount of points in the Wallet together with their value (calculated based on the ratio)
- Discount value - this value changes dynamically, based on the amount entered in the Points to exchange
Below: The screenshot shows the page entitled "CM Micropayment Easy Digital Downloads Discounts" displaying the form coming from the [cm_micropayment_points_to_discount] shortcode.
Below: After the discount has been created the [cm_micropayment_points_discounts] will display a table with the discount code, it's value and status (marked with the red border).
Using the Discounts
After creation you can copy the Discount code displayed in the table and paste it on the Easy Digital Downloads checkout form to lower the total value of the transaction (all of the Easy Digital Downloads rules for discounts apply).