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
Comment #1
bmp500 commentedUpdate:
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'),
Comment #2
j0rd commentedi think hook_form_alter might be more appropriate place for you to put this change.
Thanks for the snippet though.
Comment #3
Royce-1 commentedI 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.
Comment #4
Royce-1 commentedI 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?
Comment #5
syndicateStorm commentedI think I'll update this to a feature request for 6.x...
Comment #6
nicktr commentedIn 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.