Commerce userpoints

Overview

This module makes a bridge between Drupal Commerce module and Userpoints.
It allows users to create commerce_line items with negative points value, behaving like a discount system in the order process.
The user can choose how many points he wants to use, they will be automatically taken from his userpoints account.

Features

  • Select the type of Userpoints taxonomy should be used as "money"
  • Allow your Drupal commerce customers to complete orders using Userpoints points in the checkout process.
  • Select the a Commerce currency -> Userpoints points conversion rate (very basic for now)

it DOES NOT behave as a Commerce payment method:

  • Depending on how your site will manage points, user will or will not always have the exact amount nor enough points to fully pay an order
  • I don't want to overload the payment process by displaying an odd interface asking the user how he will pay (userpoints and CB ? CB only ? Userpoints only etc...)

Requirements

- Commerce
- Userpoints (7.x-1.x)
- Entity API

Installation

Steps for a quick install

  1. Enable the module
  2. Create a taxonomy term in userpoints vocabulary (Say "Credit" for instance)
  3. Go to Store > Config > Commerce points settings
  • Setup the taxonomy term that will serve as "money"
  • Setup the price component that can be paid by the points (base_price is the standard product total)
  • Setup the decimal multiplicator. Points are handled as "Integer" while prices are most of the time "Decimals" (Even thought Drupal Commerce manages it
  • with Integer to avoid calculation precision issues). The easiest way to handle it is to have a "100 points = 1 currency" value
  • conversion rate. To keep this conversion rate, leave the field value to 1.
  • Grant points to your user (either manually, through rules... whatever your workflow requires)
  • Test it

    1. Add an product to cart
    2. Go to checkout
    3. Use points in the checkout pane and see the line item do its thing