Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Overview

This module allows donations or other similar checkouts to happen with the user never having to worry about the "cart"

How?

You implement an object-oriented API and the module creates a new landing page URL, with the checkout panes you specify in your extension of my API object.

Existing cart orders are handled with Commerce Cart for Later

By itself, that's a useless and dangerous feature, but this becomes useful if using a module like Commerce Donate, which allows a item to be added to the order on the checkout screen via a line item.

The order handling functions are very similar to default commerce checkout, but are different so you can alter an order before the payment pane gets called (meaning you can have your line items take an empty order from $0 to $x on one single page)

When used with Commerce Donate, a one-step donation/payment screen becomes possible. Your users can submit a donation without knowing about the underlying "cart" and without having to navigate multiple steps.

Requirement

Note that this requires my Commerce Cart for Later module. This allows the single page checkouts to exist without destroying a user's existing cart.

Concept

I tried to abstract implementations of this into PHP objects. Basically, you use a hook this module provides to tell Drupal about your single page process, and then implement the interface this module defines to define various user interactions within the process.

If there's any interest in this module, I can elaborate on how this works. For now, hit up the issue queue for questions.

warning

I wouldn't recommend getting into this unless you're ready to read through code comments and understand basic OOP.

Project information