I would like to let sellers access the publishing options for their own products so they can turn visibility on/off while they get their products (online classes) ready.

I am using the product create as a trigger to automatically create a new course in an associated learning management system, so I want them to be able to create a new product, but hide it temporarily.

I don't see anything in the product module related to display of the publishing info. Could somebody point me to where I could alter the access to this?

Thanks

Comments

bmp500’s picture

Update:

In case anyone else wants to do the same thing, I altered the node.module function node_form()

In the node options for administrator I altered the access setttings to:

'#access' => user_access('administer nodes') || user_access('edit own products'),

j0rd’s picture

i think hook_form_alter might be more appropriate place for you to put this change.

Thanks for the snippet though.

Royce-1’s picture

I acompished this by creating an "active" checkbox field in the product add form, then created a workflow-ng to check the value of this field when a product is edited or added and publish/unpublish accordingly. simple with no hacks.

Royce-1’s picture

I have a feature request though, I would love to have my sellers be able to publish/unpublish from the view their products seller tab in their account. It would just be a link in the table that says publish or unpublish. Would anyone know how to do that?

syndicateStorm’s picture

Version: 5.x-1.0-beta4 » 6.x-1.x-dev
Category: support » feature

I think I'll update this to a feature request for 6.x...

nicktr’s picture

In case anyone is still interested:

Use the Override Node options module http://drupal.org/project/override_node_options
Go to permissions and tick the override product published option for your sellers.