1

I'm working on a site that needs to take custom payment and remit a part of it to one or more vendors that are determined by the products purchased (the vendors essentially create the products themselves in the shop). I have seen Ubercart Marketplace as a possibility for this, but it's rather old. However, it's the closest to what I need. Should I go with it or is there a better, more fully-integrated solution in Drupal (that uses Ubercart) that I should investigate?

1
  • Why was this question downvoted? Oct 26, 2011 at 22:21

2 Answers 2

2

This is outside Ubercart, but it's definitely possible with Drupal!

For this demonstration, I will use a point system. Let's say 100 points = $1.00.

Drupal 7 method:

  1. Create a content type, called Products.
  2. Install a Drupal module, called Entity Reference and add an Entity Reference field to the Products content type, select users. This will allow you to reference the product to vendors.
  3. Create another content type, called Points. Also add an Entity Reference field to it, and select type as users, to reference users. In addition, add a decimal field (amount).
  4. Install another Drupal module, called Rules
  5. Create a rule that would, after a certain time (30 days, etc...) from the sale date, create a Point node with that User referenced and add the commission earned.
  6. Create a rule, that would unpublish the Point node anytime the payment is withdrawn.

Another option is to use the Relation module. It's more work and still in early stages.

By creating a Point node for each commission, you're leaving all records of transactions. I would never overwrite the old commission value with new commission, i.e. $user->payment = $user->payment + 10. It will mess things up.

You can still use Ubercart with this, as it uses Drupal's entity/field structure. Simply skip #1 and use Ubercart's product content type.

1
  • I am using Drupal 6, and I already know how to associate the product with a vendor. It is the actual mechanism of the site acting as intermediary for payment between the customers and the vendors that has me stumped. Oct 23, 2011 at 6:24
2
+50

I would recommend that you go with Ubercart Marketplace for Drupal 6.x, especially if you need vendors to create their own products and have their own set of permissions to edit products, publish products, ship to vendors and/or get sales reports. I've used Ubercart Marketplace with some of my own customizations and patching (especially in the payment and reports area) but overall it does the job and in my opinion it will take a lot more if you build this functionality from scratch or try to bundle several other modules.

If you need to automatically split the payment as you get orders then take a look at Amazon Flexible Payments which lets you splits payments and has a very flexible API to do whatever you need.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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