How to ADD products for Marketplace Sellers?

MissyM - July 16, 2008 - 05:43
Project:Ubercart Marketplace
Version:5.x-1.0-beta1
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi --

Thanks for this great module.

I have a list of common items. Marketplace sellers can't sell anything that is not on the list (specifically, in the product table). Is there already a way for them to select the products from the common list and sell them? I can't find anything.

Please advise!!

Missy.

#1

Turgrid - July 16, 2008 - 13:18

The only form of product entry for Marketplace sellers is through the node create form create content -> product. Your case sounds rather custom and I am not sure how I would implement in a module that will assist everyone.

#2

torgosPizza - August 7, 2008 - 21:38

My suggestion: create a custom module.

Hook_perm: To add a special permission for marketplace users accessing the common items

Hook_access (with the "edit" $op): So that when a user is editing, make sure they have the given permission. You might want to create a new role for this purpose, along with a registration form that adds the role when completed.

Hook_form_alter: add to the form a checkbox. The checkbox can just be something like "Allow marketplace users to sell this product?" This drives the above two permissions aspects.

- within Hook_form_alter you can create a select list that is driven by your list of Common Items. Or you can perhaps tie the list into a View which provides links, such as "Create new [Common Item #1]" which will bring them to the node edit form.

Along that same line, perhaps looking into Product Classes will help you out. You can create a new product class for each common item. But this will only be valid if your situation is similar to "A Common Item is a TYPE of product that a user can sell.. not a single product." I hope this makes sense. Good luck!

 
 

Drupal is a registered trademark of Dries Buytaert.