This project is not covered by Drupal’s security advisory policy.

Need to add certain products to your Ubercart product catalog that are only available for purchase through an affiliate's website, rather than directly through your own?

The Ubercart Affiliate Product module defines a new product content type that allows you to list such products. Ubercart will treat the products the same as normal products available on the site, except that instead of the "Add to Cart" button, customers will see a "Purchase through our partner" button. The URL that the customer is sent to is specified per-product in a link field.

This module has nothing to do with the Ubercart Affiliate module; that module is for tracking leads coming from affiliates to your site. This module is for adding products to the catalog that are available on an affiliate's site.

NOTE: This module is not currently in a working state. It needs some major re-factoring, even on Drupal 6, which is one of the main reasons why it hasn't been promoted past a D6 "dev" release. We initially created it for one of our customers who changed their mind about needing the functionality before implementation was complete. RedBottle has plans to re-visit it at some point in the future, but we currently don't have the resources right now to give the module the attention it deserves.

What follows is essentially a list of the steps we followed to build the first version of "Affiliate Product" for D6. I'm hoping that these steps will allow you to get what you need set-up in the interim until we're able to port the module over.

Here are the steps:

  1. Install CCK.
  2. Install the Link / URL field.
  3. Create a Content Type called "Affiliate Product".
  4. Add the Link / URL field to the the "Affiliate Product" to hold the URL for the affiliate product.
  5. Set-up Ubercart to use the "Affiliate Product" content type like a product.
  6. Write a small module to do the following:
      a. Implement hook_forms() to provide custom "add-to-cart" and "buy it now" forms that contain the "Purchase through our partner" button.
      b. Implement the "Purchase through our partner" purchase form referenced by hook_forms().
      c. Implement a form submit handler for the form created in step 6a, and make it use drupal_goto() to redirect to the affiliate purchase URI stored in the field added to the content type in step 4.

Project information

Releases