I am using this module for a conference registration (great work by the way). I need to add the ability for an admin user to create registration nodes on the back end (people registering at the door) without having a product added to their cart each time. Basically, I want this module to ignore nodes created by an admin role. Does anyone know how I can do this?
Comments
Comment #1
dobe commentedI have recently been attempting to do this. I have added a few lines of code to the module to see.. However I have not tested it for any length of time.
On line 93 of UC_Node_Checkout.module
I replaced:
return array('administer node checkout');With:
return array('administer node checkout', 'create without checkout');On line 388 I replaced:
if (variable_get('uc_node_checkout_alter_node_submit_button', TRUE)) {With:
if (!user_access('create without checkout') && variable_get('uc_node_checkout_alter_node_submit_button', TRUE)) {On line 546 I replaced:
if (uc_node_checkout_node_associated($node)) {With:
if (uc_node_checkout_node_associated($node) && !user_access('create without checkout')) {Again I have not tested this too much further but it seems that users with the role 'create without checkout' & the admin can create the nodes without anything being added to cart. Tell me if does what you need.
Comment #2
aidanlis commentedIf you'd like to sponsor this development please reopen this issue.