I'm considering Drupal as a platform for a web project I'm working on. I'm looking for a way to sell redeem codes using UberCart, Drupal Commerce or some other module.

The client will be able to buy a single code or several codes and receive it/them by email.

Redeem code format : 201504[variable_value], eg : 201504846, 201504965, 201504347...

Any ideas on how to manage this? Will every code be considered as a product (unique SKU)?

I need to be able to import the codes into the Drupal store. How will I be able to achieve this? I buy the codes in bulk and get them in an Excel spreadsheet.

  • 1
    if you're looking for a tutorial, this is the wrong place to ask - this site is designed to help answer specific questions about specific problems. A web search will yield numerous sources for what you want. – Geoff Apr 30 '15 at 17:58

There's a UC solution called UC Product Keys out there for this particular use case, but you're better off avoiding it; the project has no 7.x version and is minimally maintained.

The Drupal Commerce equivalent is Commerce Product Key...

This module lets sites implementing the Commerce module, attach product keys to orders. Product keys / Vouchers are strings of text that are used to unlock or activate a piece of software.

Right now we have an entity that can be attached to a product and then assigned via a rule to a product once it has been bought. The required actions and rules events are fleshed out and simply require the wiring up of the rules to meet you scenario.

It probably won't do everything you need (e.g. import license keys), but it should be a good starting point to build your own product key solution off of.

| improve this answer | |

I would Not use Drupal Commerce (as in your question) for this. But instead use an approach as detailed below.

Part 1 - Create nodes

Starting from your spreadsheet, you should be able to transform them (easily) in a CSV file. Use something like the Feeds module to automatically create a single node for each of your redeem codes you want to be able to sell.

Part 2 - Use Light Shop

Use the Light Shop module, a simple and lightweight e-commerce solution. Here is a quote from its project page:

  • Session-stored basket.
  • Adding to basket and its subsequent editing/checkout process is done using AJAX. Also it works fine when JavaScript is turned off.
  • Node based shopping. As the product can be assigned to any node type. One or more. With full support Field API features (regarding nodes).
  • Orders history. For each order will be created a separate node.
  • There is no dependence on other modules.
  • Full support for working with anonymous users
  • Integration with Views.

The Node based shopping could be a perfect fit for your nodes created as described in Part 1.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.