CM MicroPayments (CMMP) - WooCommerce Discounts
One of the options of using the points is changing them to the WooCommerce 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.
Below: The ratio used for generating the discounts is the same ratio which is used in the WooCommerce Gateway.
There are two shortcodes - one to create the discounts, one to list the created discounts.
- [cm_micropayment_points_to_woo_discount] - this is the shortcode for displaying the form allowing to change the points into discounts
- [cm_micropayment_points_woo_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_woo_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 WooCommerce Discounts" displaying the form coming from the [cm_micropayment_points_to_woo_discount] shortcode.
Below: After the discount has been created the [cm_micropayment_points_woo_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 WooCommerce checkout form to lower the total value of the transaction (all of the WooCommerce rules for discounts apply)